Return a copy of the host variables.

This commit is contained in:
Jeroen Hoekx 2012-04-16 10:59:34 +02:00
commit 8c3206c99f
2 changed files with 10 additions and 1 deletions

View file

@ -219,6 +219,15 @@ class TestInventory(unittest.TestCase):
assert vars == {"hammer":True}
def test_yaml_change_vars(self):
inventory = self.yaml_inventory()
vars = inventory.get_variables('thor')
vars["hammer"] = False
vars = inventory.get_variables('thor')
assert vars == {"hammer":True}
def test_yaml_host_vars(self):
inventory = self.yaml_inventory()
vars = inventory.get_variables('saturn')