Hi,

I am trying to get my remote machine to reboot using the following code

- name: restart machine
  shell: sleep 2 && shutdown -r now "Ansible updates triggered"
  async: 1
  poll: 0
  sudo: true
  ignore_errors: true

- name: waiting for server to come back
  local_action: wait_for host={{ static_ip }} state=started delay=30 timeout
=300
  sudo: false

No matter what I try I keep getting the following error:


fatal: [192.168.0.11]: FAILED! => {
    "changed": false,
    "failed": true,
    "module_stderr": "Shared connection to 192.168.0.11 closed.\r\n",
    "module_stdout": "\r\n/bin/sh: 1: 
/home/pi/.ansible/tmp/ansible-tmp-1481969769.79-144484795431651/async_wrapper.py:
 
not found\r\n",
    "msg": "MODULE FAILURE"
}

I cannot find any information about this and I have no idea where to start.
I have tried:


   - changing the shell command
   - increasing the async value

If you set async to 0 then it doesn't generate the error, but you get a 
different error because you can't reboot on a synchronous command.


Ideas?

-- 
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/54f6ffd3-7fb4-4ab8-8da8-cc2d9f16e33e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to