-
Notifications
You must be signed in to change notification settings - Fork 467
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
Feature request: support dynamic inventories #33
Comments
Thanks, I'm going to implement a way of handling dynamic inventories. It might take a few days, as I'm kind of pressed for time at the moment. |
Hey Azimut! I've commited a set of changes that implement dynamic inventory scanning. I had to implement it against your example, examples from the Ansible documentation and the (rather broken) virtualbox dynamic inventory contrib script. It works for me, but most of the stuff I tested against has been basically mockups. Can you give it a test spin; see how it works out for you? You'll have to clone the repo, as there's no packaged release with the changes yet. Thanks for the suggestion! Regards, Ferry |
Hey, I just stumbled across this. I think I'll give it a shot against my 100+ node dynamic inventory this week |
Hey Scott! Please do! I'm curious if I got it right. ;-) Thanks!
|
Thanks for you work! Somehow it's not working for me. Should this work when a directory is passed to the |
No, the argument to -i should point directly to the script itself. Is what you describe supported by Ansible? I don't think I read that in the docs, but I could have missed it. In that case, I'll implement it. |
Yup, it's here using-multiple-inventory-sources:
Thanks again! |
Alright, I'll fix this so multiple inventory sources are supported. Thanks! |
@fboender if it doesn't already, you should check the ansible configuration for the default inventory path. |
Multiple inventory sources are now supported in the latest master. I'm going to close this issue. If it turns out something doesn't work properly, please re-open it or create a new issue. Thanks! @smiller171 I will create a new feature request for that. It's a good idea, since Ansible itself also doesn't need to be pointed to the inventory path. |
@fboender Thanks, it works for me. |
@azimut Thanks for the feedback! |
Example output of a dynamic inventory script. Where IMAP is a group name, ipaddr a host variable and virt16.example.com a host.
The text was updated successfully, but these errors were encountered: