-
Notifications
You must be signed in to change notification settings - Fork 465
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
hostformat host[01:02] not working #8
Comments
Hey Sebastian! I've implemented a host expansion algorithm. It supports numbers ([1:3]), letters ([a:z]) and zero-padding ([01:03]). It also supports multiple patterns in a hostname, though I'm not sure if Ansible even supports that. Can you verify that this new change fixes your problem? The change has been committed to the master branch, so you'll have to checkout the git repository. If you don't know how to do this, please let me know which method (package) your using to install Ansible-cmdb and I'll whip up a package for you. Thanks for the bugreport! Regards, Ferry |
Never mind that testing request. I'm reimplementing the host parsing so it'll also do group vars and such. Testing the current implementation would be pointless, since it's changing anyway. |
This sounds even better, as this would have been my next feature request! |
I can't find in the manual how variable precedence works. Would you happen to know? For example, if I have:
Would Would you happen to know? |
Here's the documentation:
Your particular case isn't mentioned, but I jsut tested it with this:
The first variable EDIT: some more older, unoffical docu: |
Then they way I implemented it is correct. Thanks for that info! I've committed a rewrite of the hosts parsing logic to the master branch. It now supports groups of groups and vars groups. I had to fake some data for testing as I don't have an extensive enough hosts definition at my disposal. Could you test it to see if it works for you? |
I just tested it from master-branch and its working! All hosts are displayed! |
Awesome Sebastian! Thanks for testing it, and thanks for your help! |
You can specify hosts in the hosts-file the following way:
See here for more info: http://docs.ansible.com/ansible/intro_inventory.html
In the generated overview, this host-pattern is not interpreted but instead shown as a single host (in red color), which does not exist.
The text was updated successfully, but these errors were encountered: