ibmi_reboot – Reboot an IBM i machine
Synopsis
Reboot a IBM i machine, wait for it to go down, come back up, and respond to commands.
Parameters
- become_user
The name of the user profile that the IBM i task will run under.
Use this option to set a user with desired privileges to run the task.
required: falsetype: str- become_user_password
Use this option to set the password of the user specified in
become_user
.required: falsetype: str- connect_timeout
Maximum seconds to wait for a successful connection to the managed hosts before trying again.
If unspecified, the default setting for the underlying connection plugin is used.
required: falsetype: intdefault: 300- controlled_end_delay_time
Specifies the amount of time(1-99999), in seconds, that the system allows a controlled end to be performed by the active subsystems.
If the value is greater than 99999,
*NOLIMIT
will be used in PWRDWNSYS command.required: falsetype: intdefault: 600- end_subsystem_option
Specifies the options to take when ending the active.
required: falsetype: strdefault: *DFTchoices: *DFT, *NOJOBLOG, *CHGPTY, *CHGTSL- how_to_end
Specifies whether the system allows the active subsystem to end processing of active jobs in a controlled manner. or whether the system ends the jobs immediately. In either case, the system does perform certain job-cleanup functions.
required: falsetype: strdefault: *IMMEDchoices: *IMMED, *CNTRLD- ipl_source
Specifies whether an initial-program-load (IPL) is started from the A-source, B-source or D-source of the system.
required: falsetype: strdefault: *PANELchoices: *PANEL, A, B, D, *IMGCLG- msg
Message to display to users before reboot.
required: falsetype: strdefault: Reboot initiated by Ansible- parameters
The parameters that PWRDWNSYS command will take.
Other than options above, all other parameters need to be specified here.
The default values of parameters for PWRDWNSYS will be taken if not specified.
Only Install PTF device(INSPTFDEV) is supported now for IBMi 7.3 and above.
required: falsetype: str- post_reboot_delay
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.
required: falsetype: intdefault: 60- pre_reboot_delay
Seconds to wait before issue the reboot command.
required: falsetype: intdefault: 60- reboot_timeout
Maximum seconds to wait for machine to reboot and respond to a test command.
This timeout is evaluated separately for both reboot verification and test command success so the maximum execution time for the module is twice this amount.
required: falsetype: intdefault: 1800- reboot_type
Specifies the point from which the initial program load (IPL) restarts.
required: falsetype: strdefault: *IPLAchoices: *IPLA, *SYS, *FULL- test_command
Command to run on the rebooted host and expect success from to determine the machine is ready for further tasks.
required: falsetype: strdefault: uname- timeout_option
Specifies the option to take when the system does not end within the time limit specified by the QPWRDWNLMT system value.
If this time limit is exceeded, the subsequent IPL will be abnormal regardless of the value specified for this parameter.
required: falsetype: strdefault: *CONTINUEchoices: *CONTINUE, *MSD, *SYSREFCDE
Examples
- name: Unconditionally reboot the machine with all defaults
ibm.power_ibmi.ibmi_reboot:
- name: Reboot a slow machine that might have lots of updates to apply
ibm.power_ibmi.ibmi_reboot:
reboot_timeout: 3600
- name: Unconditionally reboot the machine with become user
ibm.power_ibmi.ibmi_reboot:
become_user: 'USER'
become_user_password: 'yourpassword'
Notes
Note
ansible.cfg needs to specify interpreter_python=/QOpenSys/pkgs/bin/python3 under[defaults] section.
Be careful to use *CNTRLD
for option how_to_end, you need to specify the appropriate value for all the timeout options according to the system performance.
See Also
See also
reboot_module
Return Values
- rebooted
true if the machine was rebootedreturned: alwaystype: boolsample:true
- elapsed
The number of seconds that elapsed waiting for the system to be rebooted.returned: alwaystype: intsample: 553