ansible / ansible.builtin / v2.9.27 / module / redfish_command Manages Out-Of-Band controllers using Redfish APIs | "added in version" 2.7 of ansible.builtin" Authors: Jose Delarosa (@jose-delarosa) preview | supported by communityansible.builtin.redfish_command (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
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.
- 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
id: description: - ID of user to add/delete/modify required: false type: str version_added: '2.8' version_added_collection: ansible.builtin roleid: description: - role of user to add/delete/modify required: false type: str version_added: '2.8' version_added_collection: ansible.builtin baseuri: description: - Base URI of OOB controller required: true type: str command: description: - List of commands to execute on OOB controller required: true type: list timeout: default: 10 description: - Timeout in seconds for URL requests to OOB controller type: int version_added: '2.8' version_added_collection: ansible.builtin category: description: - Category to execute on OOB controller required: true type: str password: description: - Password for authentication with OOB controller required: true type: str username: description: - User for authentication with OOB controller required: true type: str version_added: '2.8' version_added_collection: ansible.builtin boot_next: description: - BootNext target when bootdevice is "UefiBootNext" required: false type: str version_added: '2.9' version_added_collection: ansible.builtin bootdevice: description: - bootdevice when setting boot configuration required: false type: str uefi_target: description: - UEFI target when bootdevice is "UefiTarget" required: false type: str version_added: '2.9' version_added_collection: ansible.builtin new_password: description: - password of user to add/delete/modify required: false type: str version_added: '2.8' version_added_collection: ansible.builtin new_username: description: - name of user to add/delete/modify required: false type: str version_added: '2.8' version_added_collection: ansible.builtin
msg: description: Message with action result or error description returned: always sample: Action was successful type: str