Is it possible to provide async time out value on the command line?

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

OK. Now I understand why its’ not doable. https://github.com/ansible/ansible/issues/255

;-( Oh well.

– Zack

Actually I would expect that to work, it’s probably true that it still needs another utils.template call somewhere.

The reason given in the ancient ticket are about variables of a different scope and don’t apply here.