diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2012-06-27 05:03:31 -0700 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2012-06-27 05:03:31 -0700 |
commit | 9efea6f7a229fefbc7ff88d441a8f3fe4f194107 (patch) | |
tree | ee2e2c0e5e026479a5dbbcfe0f82817cb8876b4d /test | |
parent | afb2e3e5acf4f2988814cb194def046d0b7d130c (diff) | |
parent | d592e15dcc8696743233dbc0b3014ce63d8ef995 (diff) | |
download | ansible-9efea6f7a229fefbc7ff88d441a8f3fe4f194107.tar.gz |
Merge pull request #512 from jhoekx/yaml-inventory-one-host
Correctly add ungrouped hosts to 'ungrouped' in YAML inventory.
Diffstat (limited to 'test')
-rw-r--r-- | test/TestInventory.py | 6 | ||||
-rw-r--r-- | test/yaml_hosts | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/TestInventory.py b/test/TestInventory.py index 883af98dcd..ef551e5816 100644 --- a/test/TestInventory.py +++ b/test/TestInventory.py @@ -222,14 +222,14 @@ class TestInventory(unittest.TestCase): inventory = self.yaml_inventory() hosts = inventory.list_hosts() print hosts - expected_hosts=['jupiter', 'saturn', 'zeus', 'hera', 'poseidon', 'thor', 'odin', 'loki'] + expected_hosts=['jupiter', 'saturn', 'mars', 'zeus', 'hera', 'poseidon', 'thor', 'odin', 'loki'] self.compare(hosts, expected_hosts) def test_yaml_all(self): inventory = self.yaml_inventory() hosts = inventory.list_hosts('all') - expected_hosts=['jupiter', 'saturn', 'zeus', 'hera', 'poseidon', 'thor', 'odin', 'loki'] + expected_hosts=['jupiter', 'saturn', 'mars', 'zeus', 'hera', 'poseidon', 'thor', 'odin', 'loki'] self.compare(hosts, expected_hosts) def test_yaml_norse(self): @@ -243,7 +243,7 @@ class TestInventory(unittest.TestCase): inventory = self.yaml_inventory() hosts = inventory.list_hosts("ungrouped") - expected_hosts=['jupiter'] + expected_hosts=['jupiter', 'mars'] self.compare(hosts, expected_hosts) def test_yaml_combined(self): diff --git a/test/yaml_hosts b/test/yaml_hosts index 6f9af62362..cf73e8d453 100644 --- a/test/yaml_hosts +++ b/test/yaml_hosts @@ -6,6 +6,8 @@ moon: titan moon2: enceladus +- host: mars + - host: zeus vars: - ansible_ssh_port: 3001 |