##### SUMMARY
Currently there is some issue with the reboot module with OpenVZ hosts. The reboot command is executed correctly, all hosts reboots, but the Ansible reboot tasks hangs.

If exactly the same playbook is run on KVM or native host, it finish without any issues.

It should be hot fixed in 2.7+ branches.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
reboot module

##### ANSIBLE VERSION
2.7

##### CONFIGURATION
Debian 9.9 / Ansible 2.8

##### OS / ENVIRONMENT
Debian 9.9


##### STEPS TO REPRODUCE
Trigger this reboot handler on OpenVZ hosts
```
- name: Reboot system
  reboot:
    reboot_timeout: 1200
    post_reboot_delay: 5
    connect_timeout: 2
  listen: handler_reboot
```

##### EXPECTED RESULTS
Reboot is executed and once the host is back online, task is marked as changed and the execution of the playbook continues.


##### ACTUAL RESULTS
```
...
RUNNING HANDLER [shared_handlers : Reboot system] ********
```
(and no more output, the Ansible playbook hangs)
type: str
    default: whoami
  msg:
    description:
    - Message to display to users.
    type: str
    default: Reboot initiated by Ansible
notes:
- If a shutdown was already scheduled on the system, C(win_reboot) will abort the scheduled shutdown and enforce its own shutdown.
- Beware that when C(win_reboot) returns, the Windows system may not have settled yet and some base services could be in limbo.
  This can result in unexpected behavior. Check the examples for ways to mitigate this.
- The connection user must have the C(SeRemoteShutdownPrivilege) privilege enabled, see
  U(https://docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/force-shutdown-from-a-remote-system)
  for more information.
seealso:
- module: reboot
author:
- Matt Davis (@nitzmahone)
'''
EXAMPLES = r'''
- name: Reboot the machine with all defaults
  win_reboot:
- name: Reboot a slow machine that might have lots of updates to apply
  win_reboot:
    reboot_timeout: 3600
# Install a Windows feature and reboot if necessary
- name: Install IIS Web-Server
  win_feature:
    name: Web-Server
  register: iis_install