redfish_config – Manages Out-Of-Band controllers using Redfish APIs

From Get docs
Ansible/docs/2.7/modules/redfish config module


redfish_config – 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 set or update a configuration attribute.
  • Manages BIOS configuration settings.
  • Manages OOB controller configuration settings.

Parameters

Parameter Choices/Defaults Comments

baseuri

- / required

Base URI of OOB controller

bios_attr_name

-

Default:

"null"

name of BIOS attribute to update

bios_attr_value

-

Default:

"null"

value of BIOS attribute to update

category

- / required

Category to execute on OOB controller

command

- / required

List of commands to execute on OOB controller

mgr_attr_name

-

Default:

"null"

name of Manager attribute to update

mgr_attr_value

-

Default:

"null"

value of Manager attribute to update

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



Examples

- name: Set BootMode to UEFI
  redfish_config:
    category: Systems
    command: SetBiosAttributes
    bios_attr_name: BootMode
    bios_attr_value: Uefi
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"

- name: Set BootMode to Legacy BIOS
  redfish_config:
    category: Systems
    command: SetBiosAttributes
    bios_attr_name: BootMode
    bios_attr_value: Bios
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"

- name: Enable PXE Boot for NIC1
  redfish_config:
    category: Systems
    command: SetBiosAttributes
    bios_attr_name: PxeDev1EnDis
    bios_attr_value: Enabled
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"

- name: Set BIOS default settings with a timeout of 20 seconds
  redfish_config:
    category: Systems
    command: SetBiosDefaultSettings
    baseuri: "{{ baseuri }}"
    user: "{{ user }}"
    password: "{{ password }}"

- name: Enable NTP in the OOB Controller
  redfish_config:
    category: Manager
    command: SetManagerAttributes
    mgr_attr_name: NTPConfigGroup.1.NTPEnable
    mgr_attr_value: Enabled
    baseuri: "{{ baseuri }}"
    user: "{{ user}}"
    password: "{{ password }}"

- name: Set NTP server 1 to {{ ntpserver1 }} in the OOB Controller
  redfish_config:
    category: Manager
    command: SetManagerAttributes
    mgr_attr_name: NTPConfigGroup.1.NTP1
    mgr_attr_value: "{{ ntpserver1 }}"
    baseuri: "{{ baseuri }}"
    user: "{{ user}}"
    password: "{{ password }}"

- name: Set Timezone to {{ timezone }} in the OOB Controller
  redfish_config:
    category: Manager
    command: SetManagerAttributes
    mgr_attr_name: Time.1.Timezone
    mgr_attr_value: "{{ timezone }}"
    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.


© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/redfish_config_module.html