# Command timeout adjustment in 2.5 with new network modules?

**URL:** <https://forum.ansible.com/t/command-timeout-adjustment-in-2-5-with-new-network-modules/27113>\
**Category:** Ansible Project\
**Created:** [March 26, 2018, 8:18am UTC](https://forum.ansible.com/t/command-timeout-adjustment-in-2-5-with-new-network-modules/27113 "2018-03-26T08:18:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott\_Pettit](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Scott\_Pettit](https://forum.ansible.com/u/Scott_Pettit)\
**Post date:** [March 26, 2018, 8:18am UTC](https://forum.ansible.com/t/command-timeout-adjustment-in-2-5-with-new-network-modules/27113/1 "2018-03-26T08:18:36Z")

</div>

Hello,

I have a number of network tasks that take a long time to run, for example firmware update tasks. In Ansible 2.4 I extended the command\_timeout by using the timeout variable on an individual task basis per [https://docs.ansible.com/ansible/2.5/network/user\_guide/network\_debug\_troubleshooting.html](https://docs.ansible.com/ansible/2.5/network/user_guide/network_debug_troubleshooting.html)

_Option 2: Increase command timeout per task basis. All network modules support a timeout value that can be set on a per task basis. The timeout value controls the amount of time in seconds before the task will fail if the command has not returned._

This doesn’t seem to be the case in Ansible 2.5 once you move to the new network\_cli connection type as the provider options go away and Ansible throws an error that you’re trying to set the timeout variable, but can’t.

I don’t want to globally adjust the command\_timeout in ansible.cfg as that has other implications when I’m hitting several hundred devices at once and they aren’t always available, so timing out quickly is a correct outcome.

I can workaround the issue by using export ANSIBLE\_PERSISTENT\_COMMAND\_TIMEOUT=xxx prior to running the playbooks I know need additional time, but what’s the correct way to adjust the command timeout on a per task basis in Ansible 2.5?

-Scott

---

<div class="post-metadata">

**Author:** ![psprygad](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@psprygad](https://forum.ansible.com/u/psprygad)\
**Post date:** [March 27, 2018, 12:05pm UTC](https://forum.ansible.com/t/command-timeout-adjustment-in-2-5-with-new-network-modules/27113/2 "2018-03-27T12:05:02Z")

</div>

For network\_cli connections, we do not support a per command timeout today. This is something we are looking at adding but as of 2.5, there is only the global timeout parameter.
