##### 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)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
                    'status': ['preview'],
                    'supported_by': 'core'}
DOCUMENTATION = r'''
module: reboot
short_description: Reboot a machine
notes:
  - C(PATH) is ignored on the remote node when searching for the C(shutdown) command. Use C(search_paths)
    to specify locations to search if the default paths do not work.
description:
    - Reboot a machine, wait for it to go down, come back up, and respond to commands.
    - For Windows targets, use the M(win_reboot) module instead.
version_added: "2.7"
options:
  pre_reboot_delay:
    description:
      - Seconds to wait before reboot. Passed as a parameter to the reboot command.
      - On Linux, macOS and OpenBSD, this is converted to minutes and rounded down. If less than 60, it will be set to 0.
      - On Solaris and FreeBSD, this will be seconds.
    type: int
    default: 0
  post_reboot_delay:
    description:
      - Seconds to wait after the reboot command was successful before attempting to validate the system rebooted successfully.
      - This is useful if you want wait for something to settle despite your connection already working.
    type: int
    default: 0