Hi,

Iam using Ansible 2.10 with python 3 in WSL linux. In ansible.cfg file, i 
set global timeout value as 180.

i also set much higher ansible_command_timeout value for certain tasks. 
However these tasks end in error as ansible shows that command timeout of 
180 secs happened. So for some reason, ansible is not considering the TASK 
specific timeout i set.


   - I removed the global timeoue value in ansible.cfg still command times 
   out after default command timeout of 30 secs. 
   - Then i created a ansible.cfg and hosts file in the scripts folder and 
   added timeout value but didn't help either.
   - Then i switched connction between network_cli and local and also 
   modified command timeout syntax accordingly but didn't help.
   - ru7nning script with -vvvv didn't give any addl insight.

This issue started only recently. So I am suspecting this may have been 
caused due to the upgrade i did from ansible 2.9 with python 2 to ansible 
2.10 with python 3 along with pip3 and other necessry installations as a 
module required ansible 2.10. Also my colleague using ansible 2.9 doesn't 
face this issue. Though i can't be sure. Anyone experienced this kind of 
issue or can come up with any workaround? i have massive list of device to 
copy image and upgrade this weekend

*ANSIBLE.CFG CONFIG:*

[defaults]

transport = paramiko

host_key_checking = False

timeout = 5

inventory = /etc/ansible/hosts

gathering = smart

fact_caching = jsonfile

fact_caching_connection = /tmp/facts_cache

fact_caching_timeout = 7200


[persistent_connection]

command_timeout = 180

*SCRIPT:*

--- 

- name: PLAYBOOK FOR 2960 PRE-UPGRADE TASKS

  hosts: SWITCHTEST2

  serial: 8

  gather_facts: false

  connection: local


  vars: 

    upgrade_ios_version: 15.2(7)E4


  tasks:

    - name: GATHER DEVICE FACTS

      ios_facts:


    - name: COPY IMAGE TO DEVICE

      ios_command:

        commands: "archive download-sw /leave-old-sw 
ftp://username:password@10.1.1.5/c2960x-universalk9-tar.155-7.E4.tar";

      timeout: 36000

*ERROR:*

TASK [COPY IMAGE TO DEVICE] 
************************************************************************************************************************************************

fatal: [SWITCHTEST2]: FAILED! => {"changed": false, "msg": "command timeout 
triggered, timeout value is 180 secs.\nSee the timeout setting options in 
the Network Debug and Troubleshooting Guide."


Regards,

Vikram

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e3ef69a7-5d64-47d0-bdca-ca94c15f6ac9n%40googlegroups.com.

Reply via email to