community.general.ipmi_power module – Power management for machine
Note
This module is part of the community.general collection (version 8.6.4).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.ipmi_power
.
Synopsis
Use this module for power management
Aliases: remote_management.ipmi.ipmi_power
Requirements
The below requirements are needed on the host that executes this module.
pyghmi
Parameters
Parameter |
Comments |
---|---|
Encryption key to connect to the BMC in hex format. |
|
Provide a list of the remote target address for the bridge IPMI request, and the power status. Either this option or |
|
Whether to ensure that the machine specified by If this option is not set, the power state is set by If both this option and Choices:
|
|
Remote target address for the bridge IPMI request. |
|
Hostname or ip address of the BMC. |
|
Password to connect to the BMC. |
|
Remote RMCP port. Default: |
|
Whether to ensure that the machine in desired state. The choices for state are: - on – Request system turn on - off – Request system turn off without waiting for OS to shutdown - shutdown – Have system request OS proper shutdown - reset – Request system reset without waiting for OS - boot – If system is off, then ‘on’, else ‘reset’ Either this option or Choices:
|
|
Maximum number of seconds before interrupt request. Default: |
|
Username to use to connect to the BMC. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Ensure machine is powered on
community.general.ipmi_power:
name: test.testdomain.com
user: admin
password: password
state: 'on'
- name: Ensure machines of which remote target address is 48 and 50 are powered off
community.general.ipmi_power:
name: test.testdomain.com
user: admin
password: password
state: 'off'
machine:
- targetAddress: 48
- targetAddress: 50
- name: Ensure machine of which remote target address is 48 is powered on, and 50 is powered off
community.general.ipmi_power:
name: test.testdomain.com
user: admin
password: password
machine:
- targetAddress: 48
state: 'on'
- targetAddress: 50
state: 'off'
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The current power state of the machine when the machine option is set. Returned: success and Sample: |
|
The current power state of the machine specified by Returned: success |
|
The remote target address. Returned: success |