Hi Dick,

I assumed script and playbook were synonymous with each other. I ran 
playbook using the command ansible-playbook sample.yaml. Again, i didn't 
mention it because i assumed this is the only way to run (unless ad hoc 
command is used), so i didn't think it was important enough to mention.

But both your points noted.

Thanks,
Vikram

On Wednesday, 1 September, 2021 at 1:37:54 am UTC+5:30 dick....@geant.org 
wrote:

> Not an actual answer but some hints for the future 
>
> On Tue, 31 Aug 2021 at 20:10, Vikram S <vikrams...@gmail.com> wrote:
>
>> 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:*
>>
>
> This looks to be the playbook. Please call it as such. "Script" is 
> ambiguous and hence confusing.
>  
>
>> --- 
>>
>> - 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:pass...@10.1.1.5/c2960x-universalk9-tar.155-7.E4.tar 
>> <ftp://username:password@10.1.1.5/c2960x-universalk9-tar.155-7.E4.tar>"
>>
>>       timeout: 36000
>>
>
> You forgot to tell how you invoked ansible-playbook (or whatever command 
> you ran). That helps us help you. 
>
> *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-proje...@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
>>  
>> <https://groups.google.com/d/msgid/ansible-project/e3ef69a7-5d64-47d0-bdca-ca94c15f6ac9n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> -- 
> Sent from a mobile device - please excuse the brevity, spelling and 
> punctuation.
>

-- 
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/08ff8653-1e48-4a81-814d-8f29969dca5cn%40googlegroups.com.

Reply via email to