1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Inventory: undefined group -> ungrouped.

Also change test name collision.
This commit is contained in:
Jeroen Hoekx 2012-05-08 09:44:59 +02:00
parent d419a13ca7
commit e09572a8e1
2 changed files with 6 additions and 6 deletions

View file

@ -54,12 +54,12 @@ class InventoryParser(object):
def _parse_base_groups(self):
undefined = Group(name='undefined')
ungrouped = Group(name='ungrouped')
all = Group(name='all')
all.add_child_group(undefined)
all.add_child_group(ungrouped)
self.groups = dict(all=all, undefined=undefined)
active_group_name = 'undefined'
self.groups = dict(all=all, ungrouped=ungrouped)
active_group_name = 'ungrouped'
for line in self.lines:
if line.startswith("["):

View file

@ -221,11 +221,11 @@ class TestInventory(unittest.TestCase):
expected_hosts=['thor', 'odin', 'loki']
self.compare(hosts, expected_hosts)
def test_simple_ungrouped(self):
def test_yaml_ungrouped(self):
inventory = self.yaml_inventory()
hosts = inventory.list_hosts("ungrouped")
expected_hosts=['jupiter','zeus']
expected_hosts=['jupiter']
self.compare(hosts, expected_hosts)
def test_yaml_combined(self):