Skip to content
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

ini-file inventories behave oddly with group/children ordering #2564

Closed
skvidal opened this issue Apr 4, 2013 · 2 comments
Closed

ini-file inventories behave oddly with group/children ordering #2564

skvidal opened this issue Apr 4, 2013 · 2 comments

Comments

@skvidal
Copy link
Contributor

skvidal commented Apr 4, 2013

If we create an inventory file like this:

[simple]
host1

[complex:children]
simple

[complex]
host2

and then we run this script

import ansible.inventory
inv = ansible.inventory.Inventory('inventory_file')
total = set(inv.get_hosts())
allgroup = inv.get_group('all')
all = set(allgroup.get_hosts())
odd = list(total.difference(all))[0]
print odd.name

We will see that 'host2' is not included in the 'all' group.

If we change the inventory file to be

[simple]
host1

[complex]
host2

[complex:children]
simple

then it all works.

I'm not sure where the bug is, but it was very confusing when I was trying to see if the variables from group_vars/all we're being picked up correctly.

@skvidal
Copy link
Contributor Author

skvidal commented Apr 4, 2013

I think this is the fix for it. It fixes for the case I outlined above
#2570

@mpdehaan
Copy link
Contributor

mpdehaan commented Apr 5, 2013

closed per above, thanks!

@mpdehaan mpdehaan closed this as completed Apr 5, 2013
robinro pushed a commit to robinro/ansible that referenced this issue Dec 9, 2016
A number of coding conventions have been adopted for new F5 modules
that are in development. To ensure common usage across the modules,
this module needed to be updated to reflect those conventions.

No functional code changes were made.
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants