Please refer below link as well,

https://gdykeman.github.io/2018/06/26/ios-upgrades/


On Fri, Jan 4, 2019 at 1:25 PM Ganesh Nalawade <ganesh...@gmail.com> wrote:

> Try adding "meta: reset_connection" after wait_for task and before check
> version task.
> Also, which Ansible version are you using?
>
> Regards,
> Ganesh
>
> On Friday, 4 January 2019 04:26:41 UTC+5:30, Sahar wrote:
>>
>> I'm trying to reboot a Cisco ASA Firewall, and run the "show version"
>> command after it. It seems that rebooting works, but when the playbook gets
>> to the show version command, it will get failed by showing the error down
>> below. Any idea about it?
>>
>>
>>
>>
>>
>> - name: Rebooting the ASA
>>   asa_command:
>>     commands:
>>     - "reload\n"
>>
>>
>> - wait_for: timeout=180
>>
>>
>> - name: check the version
>>   asa_command:
>>     commands:
>>     -  show version
>>   register: output
>>
>>
>> - name: check the version
>>   debug: var=output.stdout
>>
>>
>>
>>
>>
>> TASK [Rebooting the ASA]
>> ***********************************************************************************************************
>> skipping: [Fw4Script-02.tor.bellnhs.int]
>> ok: [Fw4Script-01.tor.bellnhs.int]
>>
>> TASK [wait_for]
>> ********************************************************************************************************************
>> skipping: [Fw4Script-02.tor.bellnhs.int]
>> ok: [Fw4Script-01.tor.bellnhs.int]
>>
>>
>> TASK [check the version]
>> ************************************************************************************************
>> skipping: [Fw4Script-02.tor.bellnhs.int]
>> An exception occurred during task execution. To see the full traceback,
>> use -vvv. The error was: ansible.module_utils.connection.ConnectionError:
>> Socket is closed
>> fatal: [Fw4Script-01.tor.bellnhs.int]: FAILED! => {"changed": false,
>> "module_stderr": "Traceback (most recent call last):\n  File
>> \"/home/shdianat/.ansible/tmp/ansible-local-12216t0E3Bw/ansible-tmp-1546555792.58-98199446309935/AnsiballZ_asa_command.py\",
>> line 113, in <module>\n    _ansiballz_main()\n  File
>> \"/home/shdianat/.ansible/tmp/ansible-local-12216t0E3Bw/ansible-tmp-1546555792.58-98199446309935/AnsiballZ_asa_command.py\",
>> line 105, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path,
>> ANSIBALLZ_PARAMS)\n  File
>> \"/home/shdianat/.ansible/tmp/ansible-local-12216t0E3Bw/ansible-tmp-1546555792.58-98199446309935/AnsiballZ_asa_command.py\",
>> line 48, in invoke_module\n    imp.load_module('__main__', mod, module,
>> MOD_DESC)\n  File \"/tmp/ansible_asa_command_payload_4Z1mL_/__main__.py\",
>> line 195, in <module>\n  File
>> \"/tmp/ansible_asa_command_payload_4Z1mL_/__main__.py\", line 165, in
>> main\n  File
>> \"/tmp/ansible_asa_command_payload_4Z1mL_/ansible_asa_command_payload.zip/ansible/module_utils/network/asa/asa.py\",
>> line 124, in run_commands\n  File
>> \"/tmp/ansible_asa_command_payload_4Z1mL_/ansible_asa_command_payload.zip/ansible/module_utils/connection.py\",
>> line 173, in __rpc__\nansible.module_utils.connection.ConnectionError:
>> Socket is closed\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee
>> stdout/stderr for the exact error", "rc": 1}
>>
>>
>>
>>
>> These are the parameters in ansible.cfg file:
>>
>> [persistent_connection]
>>
>> connect_timeout = 300
>> command_timeout = 300
>>
>> --
> 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 post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f31d7777-7e0c-4eec-a39e-96aee001f124%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f31d7777-7e0c-4eec-a39e-96aee001f124%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOfyRigatpTCO%3Dr1_UpG26fjYrM7%2BhSJfB1P%2BZy9-Qe-7ES4iw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to