-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Inventory support #47
Comments
@here... Any updates on this? |
@gvenka008c No answers. Built my own Ansible Tower. |
@Lakshman-LD Thanks. Got any repo to clone / view your Ansible tower version? |
@Lakshman-LD Any updates? |
You can automate the API, or adjust runner.js to have dynamic inventory. |
Dont have any repo to share!! sorry @gvenka008c |
@matejkramny I updated runner.js. How can i ensure the updated script is picked up by docker? |
@Lakshman-LD Thanks. |
@gvenka008c you can re-build the image or create an image from the semaphore image, and then edit those files.. Or you can attach to the container and edit files directly, restarting the node process afterwards |
Dynamic inventories will be supported in version 2 of semaphore. It is WIP in branch https://github.com/ansible-semaphore/semaphore/tree/v2 |
Sorry guys, reassigned to v2.1 release |
👍 |
Is there any update on when this feature will be available? |
It'll be a couple of weeks/days. So far (in my mind) the inventory will fetch EC2 instances using an AWS key, then filter it by a regex specified by the user. Is there more to it or just simple as that? |
Better would be utilizing the EC2 instance tags rather than just the instance metadata. My preference would be to also allow instance selection by grabbing instances that are members of an Auto Scaling Group. Often instances in AWS are deployed initially as AMIs to ASGs; being able to target the ASG members would be awesome. |
Why not just use ec2.py instead of creating something new? or give the option of piping to it? |
I was expecting to be able to point at a custom inventory file as well. |
@pgporada I agree. I'm able to do it using an empty inventory in Semaphore (I named it "From Hosts File"), and adding this to the "Extra CLI Arguments": ["--inventory", "hosts",
"--limit", "some-group"] Being able to specify a file from the git repository would allow running it as a script, as per normal ansible behaviour. |
@theasp Fantastic idea! |
Beeing able to choose an inventory file from a git repository would be awesome. |
Jip, would love it! So far, the extra cli arguments stuff works for me. |
Is there anywhere a howto for someone not familiar with nodejs? |
is this released yet? It's greyed out in |
Still grayed out in v2.4.1. I have added AWS credentials in Key Store. |
Hi there, Thanks! |
@aioue @tobiasfielitz @anitakrueger It's still unchecked in the roadmap (listed there as "Remote Inventories") |
I think this missing feature is what's going to prevent me from using Semaphore. I'd really like to be able to point it at a custom script. |
Is there a way to just point a static inventory to the ansible hosts file on the server semaphore is running off? e.g. /etc/ansible/hosts |
Actually you can specify custom inventory. You jsut need to override the parameter -i in the task template. The last -i in the code is given the priority. With -i, you can specify a custom script located in your git playbook, the custom script will be downloaded automatically and so you can use relative path. ex: ["-i","script.sh"] and script.sh is in the directory of your playboo in git. |
I would like to try to get this feature in, via the api rather than an -i override into a 2.6.0 version |
closing this as file type of inventory allows for dynamic inventory files to be included in the source repo |
According to semaphoreui/semaphore#47 (comment) using a file should work, but I could not find it in the docs. After taking a leap of faith and testing on my install, it seems to work. If you run a play that is located in a git repo, then Semaphore will actually search for the inventory file in the location specified, but relative to your playbook location. So using standard Ansible practices, creating a folder in your git repo called `inventory` and then putting your yaml file in there, will actually work when referenced in the "inventory" configuration in Semaphore UI.
I use aws with ansible, so dynamic inventory is used instead of adding hosts manually. Is this possible with semaphore?
Documentation for running playbooks from local machine? I am not able see the documentation for running test playbooks with git repo, if I have missed it, can you point the documentation.
The text was updated successfully, but these errors were encountered: