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

*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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5a5a5d44-7375-498b-ba3a-290745b568b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to