InventoryDir: refactor logic

Make sure all hosts and groups are unique objects
and that those are referenced uniquely everywhere.
Also fixes test_dir_inventory unit tests which were broken after previous
patches.

	modified:   lib/ansible/inventory/dir.py
This commit is contained in:
Serge van Ginderachter 2014-03-20 01:40:06 +01:00
parent 188375171e
commit d3eaa1b79e
2 changed files with 146 additions and 27 deletions

View file

@ -425,7 +425,7 @@ class TestInventory(unittest.TestCase):
expected_vars = {'inventory_hostname': 'zeus',
'inventory_hostname_short': 'zeus',
'group_names': ['greek', 'major-god', 'ungrouped'],
'group_names': ['greek', 'major-god'],
'var_a': '3#4'}
print "HOST VARS=%s" % host_vars