thanks dick for replying. I was able to figure it out the issue. I had to 
"register" to keep it going. 

On Friday, February 14, 2020 at 9:23:14 AM UTC-8, Dick Visser wrote:
>
> Hi 
>
> The reboot module was created to avoid manual fiddling with shell cruft 
> like you do now. So what’s the reason you are not using the reboot module?
> If possible please reply to this thread and don’t start yet another one.
>
> Thx!
>
>
> On Thu, 13 Feb 2020 at 20:55, Work-Hard <workema...@gmail.com 
> <javascript:>> wrote:
>
>> *Hi, can someone please explain why my playbook for instance timeout 
>> after a reboot:*
>> /dev/null 2>&1 && sleep 0'
>> The full traceback is:
>> WARNING: The below traceback may *not* be related to the actual failure.
>>   File 
>> "/tmp/ansible_wait_for_payload_NqkPb5/ansible_wait_for_payload.zip/ansible/modules/utilities/logic/wait_for.py",
>>  
>> line 599, in main
>>   File 
>> "/tmp/ansible_wait_for_payload_NqkPb5/ansible_wait_for_payload.zip/ansible/modules/utilities/logic/wait_for.py",
>>  
>> line 456, in _create_connection
>>   File "/usr/lib/python2.7/socket.py", line 557, in create_connection
>>     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
>>
>> fatal: [10.0.2.236 -> localhost]: FAILED! => {
>>     "changed": false,
>>     "elapsed": 600,
>>     "invocation": {
>>         "module_args": {
>>             "active_connection_states": [
>>                 "ESTABLISHED",
>>                 "FIN_WAIT1",
>>                 "FIN_WAIT2",
>>                 "SYN_RECV",
>>                 "SYN_SENT",
>>                 "TIME_WAIT"
>>             ],
>>             "connect_timeout": 5,
>>             "delay": 5,
>>             "exclude_hosts": null,
>>             "host": "ubuntu",
>>             "msg": null,
>>             "path": null,
>>             "port": 22,
>>             "search_regex": null,
>>             "sleep": 1,
>>             "state": "started",
>>             "timeout": 600
>>         }
>>     },
>>     "msg": "Timeout when waiting for ubuntu:22"
>> }
>>
>>
>>
>> playbook : 
>>
>>     - name: reboot node
>>       shell: sleep 2 && shutdown -r now "Reboot triggered by ansible"
>>       async: 1
>>       poll: 0
>>       ignore_errors: true
>>
>>     # poll ssh port until we get a tcp connect
>>     - name: wait for node to finish booting
>>       become: false
>>       local_action: wait_for host=ubuntu
>>           port=22
>>           state=started
>>           delay=5
>>           timeout=600
>> *--------------(timeout after this)--------------FYI: instance was 
>> rebooted within 60 secs*
>>     # give sshd time to start fully
>>     - name: wait for ssh to start fully
>>       pause:
>>         seconds: 15
>>
>>     # wait a few minutes between hosts, unless we're on the last
>>     - name: waiting between hosts
>>       pause:
>>         minutes: 10
>>       when: inventory_hostname != ansible_play_hosts[-1]
>>
>> *Please explain thanks*
>>
>>
>> -- 
>> 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...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/72837911-8769-4ace-8f7f-ae20082a66a4%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/72837911-8769-4ace-8f7f-ae20082a66a4%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/71888e6e-4793-4fa6-99d9-0c11b5f67bdf%40googlegroups.com.

Reply via email to