dellemc.openmanage.redfish_powerstate module – Manage device power state
Note
This module is part of the dellemc.openmanage collection (version 5.5.0).
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 dellemc.openmanage
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.openmanage.redfish_powerstate
.
New in dellemc.openmanage 2.1.0
Synopsis
This module allows to manage the different power states of the specified device.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.8.6
Parameters
Parameter |
Comments |
---|---|
IP address of the target out-of-band controller. For example- <ipaddress>:<port>. |
|
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
|
Password of the target out-of-band controller. |
|
This option resets the device. If If If If If If If If If When a power control operation is performed, which is not supported on the device, an error message is displayed with the list of operations that can be performed. Choices:
|
|
The socket level timeout in seconds. Default: |
|
Username of the target out-of-band controller. |
|
If Configure Prior to collection version Choices:
|
Notes
Note
Run this module from a system that has direct access to Redfish APIs.
This module supports
check_mode
.
Examples
---
- name: Manage power state of the first device
dellemc.openmanage.redfish_powerstate:
baseuri: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
reset_type: "On"
- name: Manage power state of a specified device
dellemc.openmanage.redfish_powerstate:
baseuri: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
reset_type: "ForceOff"
resource_id: "System.Embedded.1"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Details of the HTTP error. Returned: on http error Sample: |
|
Overall status of the reset operation. Returned: always Sample: |