Reinstate --extra-vars, which can do things in playbooks like:

ansible-playbook release-my-app.yml --extra-vars="version=123"

And make $version available in the playbook without re-editing the file
This commit is contained in:
Michael DeHaan
2012-04-26 19:56:10 -04:00
parent a0ac936a55
commit b9982fc17b
6 changed files with 44 additions and 41 deletions

View File

@@ -141,7 +141,7 @@ class TestPlaybook(unittest.TestCase):
runner_callbacks = self.test_callbacks
)
result = self.playbook.run()
print utils.bigjson(dict(events=EVENTS))
# print utils.bigjson(dict(events=EVENTS))
return result
def test_one(self):
@@ -166,5 +166,6 @@ class TestPlaybook(unittest.TestCase):
# make sure the template module took options from the vars section
data = file('/tmp/ansible_test_data_template.out').read()
print data
assert data.find("ears") != -1, "template success"