Support dicts in inventory vars.

This commit is contained in:
Jeroen Hoekx
2012-04-19 08:26:54 +02:00
parent 30d06dbcea
commit 903e4f6eae
3 changed files with 15 additions and 8 deletions

View File

@@ -220,13 +220,13 @@ class TestInventory(unittest.TestCase):
inventory = self.yaml_inventory()
vars = inventory.get_variables('saturn')
assert vars == {"moon":"titan"}
assert vars == {"moon":"titan", "moon2":"enceladus"}
def test_yaml_port(self):
inventory = self.yaml_inventory()
vars = inventory.get_variables('hera')
assert vars == {'ansible_ssh_port': 3000}
assert vars == {'ansible_ssh_port': 3000, 'ntp_server': 'olympus.example.com'}
### Test Runner class method