##### 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)
- name: Reboot when Web-Server feature requires it
  win_reboot:
  when: iis_install.reboot_required
# One way to ensure the system is reliable, is to set WinRM to a delayed startup
- name: Ensure WinRM starts when the system has settled and is ready to work reliably
  win_service:
    name: WinRM
    start_mode: delayed
# Additionally, you can add a delay before running the next task
- name: Reboot a machine that takes time to settle after being booted
  win_reboot:
    post_reboot_delay: 120
# Or you can make win_reboot validate exactly what you need to work before running the next task
- name: Validate that the netlogon service has started, before running the next task
  win_reboot:
    test_command: 'exit (Get-Service -Name Netlogon).Status -ne "Running"'
'''
RETURN = r'''
rebooted:
  description: True if the machine was rebooted.
  returned: always
  type: bool
  sample: true
elapsed:
  description: The number of seconds that elapsed waiting for the system to be rebooted.
  returned: always
  type: float
  sample: 23.2
'''