mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
List hosts in no group in the ungrouped group.
This commit is contained in:
@@ -51,6 +51,13 @@ class TestInventory(unittest.TestCase):
|
||||
expected_hosts=['thor', 'odin', 'loki']
|
||||
assert hosts == expected_hosts
|
||||
|
||||
def test_simple_ungrouped(self):
|
||||
inventory = self.simple_inventory()
|
||||
hosts = inventory.list_hosts("ungrouped")
|
||||
|
||||
expected_hosts=['jupiter', 'saturn']
|
||||
assert hosts == expected_hosts
|
||||
|
||||
def test_simple_combined(self):
|
||||
inventory = self.simple_inventory()
|
||||
hosts = inventory.list_hosts("norse:greek")
|
||||
@@ -176,6 +183,13 @@ class TestInventory(unittest.TestCase):
|
||||
expected_hosts=['thor', 'odin', 'loki']
|
||||
assert hosts == expected_hosts
|
||||
|
||||
def test_simple_ungrouped(self):
|
||||
inventory = self.yaml_inventory()
|
||||
hosts = inventory.list_hosts("ungrouped")
|
||||
|
||||
expected_hosts=['jupiter']
|
||||
assert hosts == expected_hosts
|
||||
|
||||
def test_yaml_combined(self):
|
||||
inventory = self.yaml_inventory()
|
||||
hosts = inventory.list_hosts("norse:greek")
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
vars:
|
||||
- moon: titan
|
||||
|
||||
- zeus
|
||||
|
||||
- group: greek
|
||||
hosts:
|
||||
- zeus
|
||||
|
||||
Reference in New Issue
Block a user