reboot – Reboot AIX machines.

Synopsis

Reboot a machine and validate by runnning a test command once the system comes back up.

Requirements

The below requirements are needed on the host that executes this module.

  • Python >= 3.6

  • Privileged user with authorization: aix.system.boot.shutdown

  • In ansible.cfg file, ensure that ssh_args are properly set, so that ssh connection does not end up in a hang. For example, ssh_args = -o ForwardAgent=yes -o ControlPersist=30m -o ServerAliveInterval=45 -o ServerAliveCountMax=10

Parameters

pre_reboot_delay (optional, int, 0)

Seconds to wait before reboot. Passed as a parameter to the reboot command.

post_reboot_delay (optional, int, 0)

Seconds to wait for validation after reboot command was successful

reboot_timeout (optional, int, 300)

Maximum seconds to wait for machine to reboot and respond to a test command.

test_command (optional, str, whoami)

Command to run on the rebooted host to validate system running status.

Examples

- name: "Reboot a machine"
  reboot:
    pre_reboot_delay: 20
    post_reboot_delay: 20
    connect_timeout: 10
    reboot_timeout: 300

Return Values

msg (always, str, System has been rebooted SUCCESSFULLY)

The execution message.

rc (If the command failed., int, )

The return code.

stdout (If the command failed., str, )

The standard output.

stderr (If the command failed., str, )

The standard error.

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by community.

Authors

  • AIX Development Team (@pbfinley1911)