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¶
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 one-time boot device to UefiTarget of "/0x31/0x33/0x01/0x01"
  redfish_command:
    category: Systems
    command: SetOneTimeBoot
    bootdevice: "UefiTarget"
    uefi_target: "/0x31/0x33/0x01/0x01"
    baseuri: "{{ baseuri }}"
    username: "{{ username }}"
    password: "{{ password }}"
- name: Set one-time boot device to BootNext target of "Boot0001"
  redfish_command:
    category: Systems
    command: SetOneTimeBoot
    bootdevice: "UefiBootNext"
    boot_next: "Boot0001"
    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]
Authors¶
- Jose Delarosa (@jose-delarosa)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
