dellemc.openmanage.redfish_powerstate – Manage device power state
dellemc.openmanage.redfish_powerstate – Manage device power state
Note
This plugin is part of the dellemc.openmanage collection (version 3.0.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
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 >= 2.7.5
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
baseuri string / required |
IP address of the target out-of-band controller. For example- :. | |
password string / required |
Password of the target out-of-band controller. | |
reset_type string / required |
|
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. |
resource_id string |
The unique identifier of the device being managed. For example- https:///redfish/v1/Systems/. This option is mandatory for base_uri with multiple devices. To get the device details, use the API https:///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:
Key | Returned | Description |
---|---|---|
error_info dictionary |
on http error |
Details of the HTTP error.
Sample: {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to complete the operation because the resource /redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset entered in not found.', 'MessageArgs': ['/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset'], '[email protected]': 1, 'MessageId': 'IDRAC.2.1.SYS403', 'RelatedProperties': [], '[email protected]': 0, 'Resolution': 'Enter the correct resource and retry the operation. For information about valid resource, see the Redfish Users Guide available on the support site.', 'Severity': 'Critical'}], 'code': 'Base.1.5.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information'}} |
msg string |
always |
Overall status of the reset operation.
Sample: Successfully performed the reset type operation 'On'. |
Authors
- Sajna Shetty(@Sajna-Shetty)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/dellemc/openmanage/redfish_powerstate_module.html