reboot

Collection: builtin

Full Name: parallax.builtin.reboot

Aliases: ansible.builtin.reboot, reboot

Synopsis

Manage reboot

Parameters

NameTypeRequiredDefaultDescription
pre_reboot_delayint0Seconds to wait before reboot
post_reboot_delayint0Seconds to wait after the reboot command was successful
reboot_timeoutint600Maximum seconds to wait for machine to reboot and respond to a test command
connect_timeoutint5Maximum seconds to wait for a successful connection to the managed hosts before trying again
test_commandstringwhoamiCommand to run on the rebooted host and expect success from to determine the machine is ready for further tasks
msgstringReboot initiated by AnsibleMessage to display to users before reboot
search_pathslist[/sbin /usr/sbin /usr/local/sbin /bin /usr/bin /usr/local/bin]Paths to search on the remote machine for the shutdown command
boot_time_commandstringcat /proc/sys/kernel/random/boot_idCommand to run that returns a unique string indicating the last time the system was booted
reboot_commandstringshutdown -r nowCommand to run to reboot the machine

Example

- name: Example reboot task
  reboot:
    pre_reboot_delay: 0
    post_reboot_delay: 0