In the http://ansible.cc/docs/playbooks2.html#passing-variables-on-the-command-line there is a couple of examples about passing variables on the command line.
I wish to run tcpdump on a set of hosts for different durations. Sure, I can use sed to change the integer values specified on the async: line. But IMHO it would be great if I can use the --extra-vars “… duration=60 …” for example.
Tried it but immediately got this on my host running Ubuntu 11.04 64bit:
[…]
File “/usr/lib/pymodules/python2.7/ansible/playbook/task.py”, line 164, in init
self.async_seconds = int(ds.get(‘async’, 0)) # not async by default
ValueError: invalid literal for int() with base 10: ‘{{ duration }}’
Any way out?
– Zack