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

**URL:** <https://forum.ansible.com/t/is-it-possible-to-provide-async-time-out-value-on-the-command-line/12745>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [April 30, 2013, 9:46pm UTC](https://forum.ansible.com/t/is-it-possible-to-provide-async-time-out-value-on-the-command-line/12745 "2013-04-30T21:46:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zack\_Perry](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@Zack\_Perry](https://forum.ansible.com/u/Zack_Perry)\
**Post date:** [April 30, 2013, 9:46pm UTC](https://forum.ansible.com/t/is-it-possible-to-provide-async-time-out-value-on-the-command-line/12745/1 "2013-04-30T21:46:49Z")

</div>

In the [http://ansible.cc/docs/playbooks2.html#passing-variables-on-the-command-line](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

---

<div class="post-metadata">

**Author:** ![Zack\_Perry](https://avatars.discourse-cdn.com/v4/letter/z/54ee81/32.png) [@Zack\_Perry](https://forum.ansible.com/u/Zack_Perry)\
**Post date:** [April 30, 2013, 11:08pm UTC](https://forum.ansible.com/t/is-it-possible-to-provide-async-time-out-value-on-the-command-line/12745/2 "2013-04-30T23:08:10Z")

</div>

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

;-( Oh well.

– Zack

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 1, 2013, 1:06am UTC](https://forum.ansible.com/t/is-it-possible-to-provide-async-time-out-value-on-the-command-line/12745/3 "2013-05-01T01:06:32Z")

</div>

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.
