ansible.builtin.reboot – Reboot a machine¶
This module is part of
ansible-base and included in all Ansible
installations. In most cases, you can use the short module name
reboot even without specifying the
Despite that, we recommend you use the FQCN for easy linking to the module
documentation and to avoid conflicting with other collections that may have
the same module name.
New in version 2.7: of ansible.builtin
Reboot a machine, wait for it to go down, come back up, and respond to commands.
For Windows targets, use the ansible.windows.win_reboot module instead.
This module has a corresponding action plugin.
PATHis ignored on the remote node when searching for the
search_pathsto specify locations to search if the default paths do not work.
The official documentation on the ansible.windows.win_reboot module.
- name: Unconditionally reboot the machine with all defaults reboot: - name: Reboot a slow machine that might have lots of updates to apply reboot: reboot_timeout: 3600 - name: Reboot a machine with shutdown command in unusual place reboot: search_paths: - '/lib/molly-guard'
Common return values are documented here, the following are the fields unique to this module:
The number of seconds that elapsed waiting for the system to be rebooted.
true if the machine was rebooted