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
password
- / required
Password for authentication with OOB controller
timeout
integer
added in 2.7.11
Default:
10
Timeout in seconds for URL requests to OOB controller
user
- / required
User for authentication with OOB controller
userid
-
ID of user to add/delete/modify
username
-
name of user to add/delete/modify
userpswd
-
password of user to add/delete/modify
userrole
-
role of user to add/delete/modify

Examples

- name: Restart system power gracefully
  redfish_command:
    category: Systems
    command: PowerGracefulRestart
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"

- name: Set one-time boot device to {{ bootdevice }}
  redfish_command:
    category: Systems
    command: SetOneTimeBoot
    bootdevice: "{{ bootdevice }}"
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"

- name: Add and enable user
  redfish_command:
    category: Accounts
    command: AddUser,EnableUser
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"
    userid: "{{ userid }}"
    username: "{{ username }}"
    userpswd: "{{ userpswd }}"
    userrole: "{{ userrole }}"

- name: Disable and delete user
  redfish_command:
    category: Accounts
    command: ["DisableUser", "DeleteUser"]
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"
    userid: "{{ userid }}"

- name: Update user password
  redfish_command:
    category: Accounts
    command: UpdateUserPassword
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"
    userid: "{{ userid }}"
    userpswd: "{{ userpswd }}"

- name: Clear Manager Logs with a timeout of 20 seconds
  redfish_command:
    category: Manager
    command: ClearLogs
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    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

Authors

  • Jose Delarosa (github: jose-delarosa)

Hint

If you notice any issues in this documentation you can edit this document to improve it.