community.general.redfish_config module – Manages Out-Of-Band controllers using Redfish APIs
Note
This module is part of the community.general collection (version 5.8.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.redfish_config
.
Synopsis
Builds Redfish URIs locally and sends them to remote OOB controllers to set or update a configuration attribute.
Manages BIOS configuration settings.
Manages OOB controller configuration settings.
Parameters
Parameter |
Comments |
---|---|
Security token for authenticating to OOB controller. |
|
Base URI of OOB controller. |
|
Dictionary of BIOS attributes to update. Default: |
|
List of BootOptionReference strings specifying the BootOrder. Default: |
|
Category to execute on OOB controller. |
|
List of commands to execute on OOB controller. |
|
Setting dict of HostInterface on OOB controller. Default: |
|
Redfish HostInterface instance ID if multiple HostInterfaces are present. |
|
Setting dict of manager services to update. Default: |
|
EthernetInterface Address string on OOB controller. Default: |
|
Setting dict of EthernetInterface on OOB controller. Default: |
|
Password for authenticating to OOB controller. |
|
ID of the System, Manager or Chassis to modify. |
|
Setting dict of Sessions. Default: |
|
Removes surrounding quotes of etag used in Only use this option to resolve bad vendor implementation where Choices:
|
|
Timeout in seconds for HTTP requests to OOB controller. Default: |
|
Username for authenticating to OOB controller. |
Examples
- name: Set BootMode to UEFI
community.general.redfish_config:
category: Systems
command: SetBiosAttributes
resource_id: 437XR1138R2
bios_attributes:
BootMode: "Uefi"
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Set multiple BootMode attributes
community.general.redfish_config:
category: Systems
command: SetBiosAttributes
resource_id: 437XR1138R2
bios_attributes:
BootMode: "Bios"
OneTimeBootMode: "Enabled"
BootSeqRetry: "Enabled"
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Enable PXE Boot for NIC1
community.general.redfish_config:
category: Systems
command: SetBiosAttributes
resource_id: 437XR1138R2
bios_attributes:
PxeDev1EnDis: Enabled
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Set BIOS default settings with a timeout of 20 seconds
community.general.redfish_config:
category: Systems
command: SetBiosDefaultSettings
resource_id: 437XR1138R2
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
timeout: 20
- name: Set boot order
community.general.redfish_config:
category: Systems
command: SetBootOrder
boot_order:
- Boot0002
- Boot0001
- Boot0000
- Boot0003
- Boot0004
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Set boot order to the default
community.general.redfish_config:
category: Systems
command: SetDefaultBootOrder
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Set Manager Network Protocols
community.general.redfish_config:
category: Manager
command: SetNetworkProtocols
network_protocols:
SNMP:
ProtocolEnabled: true
Port: 161
HTTP:
ProtocolEnabled: false
Port: 8080
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Set Manager NIC
community.general.redfish_config:
category: Manager
command: SetManagerNic
nic_config:
DHCPv4:
DHCPEnabled: false
IPv4StaticAddresses:
Address: 192.168.1.3
Gateway: 192.168.1.1
SubnetMask: 255.255.255.0
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Disable Host Interface
community.general.redfish_config:
category: Manager
command: SetHostInterface
hostinterface_config:
InterfaceEnabled: false
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Enable Host Interface for HostInterface resource ID '2'
community.general.redfish_config:
category: Manager
command: SetHostInterface
hostinterface_config:
InterfaceEnabled: true
hostinterface_id: "2"
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
- name: Set SessionService Session Timeout to 30 minutes
community.general.redfish_config:
category: Sessions
command: SetSessionService
sessions_config:
SessionTimeout: 1800
baseuri: "{{ baseuri }}"
username: "{{ username }}"
password: "{{ password }}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Message with action result or error description Returned: always Sample: |
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication