dellemc.openmanage.redfish_powerstate – Manage device power state¶
Note
This plugin is part of the dellemc.openmanage collection (version 3.2.0).
To install it use: ansible-galaxy collection install dellemc.openmanage
.
To use it in a playbook, specify: dellemc.openmanage.redfish_powerstate
.
New in version 2.1.0: of dellemc.openmanage
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7.5
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
baseuri
string
/ required
|
IP address of the target out-of-band controller. For example- <ipaddress>:<port>.
|
|
password
string
/ required
|
Password of the target out-of-band controller.
|
|
reset_type
string
/ required
|
|
This option resets the device.
If
ForceOff , Turns off the device immediately.If
ForceOn , Turns on the device immediately.If
ForceRestart , Turns off the device immediately, and then restarts the device.If
GracefulRestart , Performs graceful shutdown of the device, and then restarts the device.If
GracefulShutdown , Performs a graceful shutdown of the device, and the turns off the device.If
Nmi , Sends a diagnostic interrupt to the device. This is usually a non-maskable interrupt (NMI) on x86 device.If
On , Turns on the device.If
PowerCycle , Performs power cycle on the device.If
PushPowerButton , Simulates the pressing of a physical power button on the device.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.
|
resource_id
string
|
The unique identifier of the device being managed. For example- https://<baseuri>/redfish/v1/Systems/<resource_id>.
This option is mandatory for base_uri with multiple devices.
To get the device details, use the API https://<baseuri>/redfish/v1/Systems.
|
|
username
string
/ required
|
Username of the target out-of-band controller.
|
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"
reset_type: "On"
- name: Manage power state of a specified device
dellemc.openmanage.redfish_powerstate:
baseuri: "192.168.0.1"
username: "username"
password: "password"
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:
Authors¶
Sajna Shetty(@Sajna-Shetty)