community.general.redfish_config – Manages Out-Of-Band controllers using Redfish APIs
community.general.redfish_config – Manages Out-Of-Band controllers using Redfish APIs
Note
This plugin is part of the community.general collection (version 1.3.2).
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 | Choices/Defaults | Comments |
---|---|---|
baseuri string / required |
Base URI of OOB controller | |
bios_attribute_name string |
Default: "null" |
name of BIOS attr to update (deprecated - use bios_attributes instead) |
bios_attribute_value raw |
Default: "null" |
value of BIOS attr to update (deprecated - use bios_attributes instead) |
bios_attributes dictionary added in 0.2.0 of community.general |
Default: {} |
dictionary of BIOS attributes to update |
boot_order list / elements=string added in 0.2.0 of community.general |
Default: [] |
list of BootOptionReference strings specifying the BootOrder |
category string / required |
Category to execute on OOB controller | |
command list / elements=string / required |
List of commands to execute on OOB controller | |
network_protocols dictionary added in 0.2.0 of community.general |
setting dict of manager services to update | |
nic_addr string added in 0.2.0 of community.general |
Default: "null" |
EthernetInterface Address string on OOB controller |
nic_config dictionary added in 0.2.0 of community.general |
setting dict of EthernetInterface on OOB controller | |
password string / required |
Password for authentication with OOB controller | |
resource_id string added in 0.2.0 of community.general |
The ID of the System, Manager or Chassis to modify | |
timeout integer |
Default: 10 |
Timeout in seconds for URL requests to OOB controller |
username string / required |
User for authentication with 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 using deprecated options
community.general.redfish_config:
category: Systems
command: SetBiosAttributes
resource_id: 437XR1138R2
bios_attribute_name: PxeDev1EnDis
bios_attribute_value: 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 }}"
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 |
Authors
- Jose Delarosa (@jose-delarosa)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/redfish_config_module.html