Replies: 10 comments 12 replies
-
Greetings. I cannot reproduce your use-case as I don't have a netbox set-up, but as I see it - as far as all the needed inventory files exist on the semaphore-server you should be able to use it with the 'inventory file' option. Have you tried running the Ansible CLI with the inventory-files you generated? - AnsibleGuy |
Beta Was this translation helpful? Give feedback.
-
Also: Related to #1236 |
Beta Was this translation helpful? Give feedback.
-
Hi all, I'm using Semaphore in a Docker env and got it working with Netbox no issues, (Except getting the Survey Variable to take the ansible_limit, I have yet to debug this) But in essence Semaphore doesn't care if your Inventory file is a real Json inventory or the config to access Netbox, as @ansibleguy said create you inventory.yml as per the Netbox docs and feed that to Semaphore which will in turn pass it straight to Ansible. Any errors you get will be Ansible pure errors :
As I said i'm in a Docker env so I created a new container with my requirements:
I hope this help, I like this project :) |
Beta Was this translation helpful? Give feedback.
-
@craigarms still doesn't work. This is what my semaphore inventory config looks like. The inventory file itself looks like
Then running the task in semaphore I get the following:
|
Beta Was this translation helpful? Give feedback.
-
FWIW, I did add a "requirements.yaml" file into the repo with what you stated above, but doesn't appear to do anything. |
Beta Was this translation helpful? Give feedback.
-
So is it possible to have a dynamic netbox inventory or not? I don't get it. |
Beta Was this translation helpful? Give feedback.
-
OK, but where put I the requirements.txt (pip) and the requirements.yml (galxy roles / collections)? |
Beta Was this translation helpful? Give feedback.
-
That is certainly very helpful, thank you so much @craigarms Edit:
|
Beta Was this translation helpful? Give feedback.
-
There seems to be a problem with the collection requirements.yml. It can't be found, even if it's there. |
Beta Was this translation helpful? Give feedback.
-
Looks like you got Netbox working so far, maybe you can provide some instructions within the documentation at https://github.com/semaphoreui/ansible-semaphore-docs? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to configure semaphore to use a dynamic inventory from Netbox (much like you can do via ansible on the CLI).
Is this feasible?
I tried to dump the current ansible inventory file (backhanded by netbox) and dumping it into a yml file (ansible-inventory --list > inventory.yml) and specifying that as a "inventory file" but that didn't appear to work correctly.
Beta Was this translation helpful? Give feedback.
All reactions