redfish_command – Manages Out-Of-Band controllers using Redfish APIs¶
New in version 2.7.
Synopsis¶
Builds Redfish URIs locally and sends them to remote OOB controllers to perform an action.
Manages OOB controller ex. reboot, log management.
Manages OOB controller users ex. add, remove, update.
Manages system power ex. on, off, graceful and forced reboot.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
baseuri
-
/ required
|
Base URI of OOB controller
|
|
bootdevice
-
|
bootdevice when setting boot configuration
|
|
category
-
/ required
|
Category to execute on OOB controller
|
|
command
-
/ required
|
List of commands to execute on OOB controller
|
|
id
-
added in 2.8 |
ID of user to add/delete/modify
|
|
new_password
-
added in 2.8 |
password of user to add/delete/modify
|
|
new_username
-
added in 2.8 |
name of user to add/delete/modify
|
|
password
-
/ required
|
Password for authentication with OOB controller
|
|
roleid
-
added in 2.8 |
role of user to add/delete/modify
|
|
timeout
integer
added in 2.8 |
Default: 10
|
Timeout in seconds for URL requests to OOB controller
|
username
-
/ required
added in 2.8 |
User for authentication with OOB controller
|
Examples¶
- name: Restart system power gracefully
redfish_command:
category: Systems
command: PowerGracefulRestart
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Set one-time boot device to {{ bootdevice }}
redfish_command:
category: Systems
command: SetOneTimeBoot
bootdevice: "{{ bootdevice }}"
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Set chassis indicator LED to blink
redfish_command:
category: Chassis
command: IndicatorLedBlink
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Add and enable user
redfish_command:
category: Accounts
command: AddUser,EnableUser
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
id: "{{ id }}"
new_username: "{{ new_username }}"
new_password: "{{ new_password }}"
roleid: "{{ roleid }}"
- name: Disable and delete user
redfish_command:
category: Accounts
command: ["DisableUser", "DeleteUser"]
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
id: "{{ id }}"
- name: Update user password
redfish_command:
category: Accounts
command: UpdateUserPassword
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
id: "{{ id }}"
new_password: "{{ new_password }}"
- name: Clear Manager Logs with a timeout of 20 seconds
redfish_command:
category: Manager
command: ClearLogs
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
timeout: 20
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
msg
string
|
always |
Message with action result or error description
Sample:
Action was successful
|
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]