title: How to reboot CentOS 7 with Ansible?
body: <p>I'm trying to reboot server running <code>CentOS 7</code> on VirtualBox. I use this task:</p>
  
  <pre><code>- name: Restart server
    command: /sbin/reboot
    async: 0
    poll: 0
    ignore_errors: true
  </code></pre>
  
  <p>Server is rebooted, but I get this error:</p>
  
  <pre><code>TASK: [common | Restart server] ***********************************************
  fatal: [rolcabox] =&gt; SSH Error: Shared connection to 127.0.0.1 closed.
  It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
  
  FATAL: all hosts have already failed -- aborting
  </code></pre>
  
  <p>What am I doing wrong? How can I fix this?</p>