community.general.redfish_config (1.3.14) — module

Manages Out-Of-Band controllers using Redfish APIs

Authors: Jose Delarosa (@jose-delarosa)

Install collection

Install with ansible-galaxy collection install community.general:==1.3.14


Add to requirements.yml

  collections:
    - name: community.general
      version: 1.3.14

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Set boot order to the default
    community.general.redfish_config:
      category: Systems
      command: SetDefaultBootOrder
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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 }}"

Inputs

    
baseuri:
    description:
    - Base URI of OOB controller
    required: true
    type: str

command:
    description:
    - List of commands to execute on OOB controller
    elements: str
    required: true
    type: list

timeout:
    default: 10
    description:
    - Timeout in seconds for URL requests to OOB controller
    type: int

category:
    description:
    - Category to execute on OOB controller
    required: true
    type: str

nic_addr:
    default: 'null'
    description:
    - EthernetInterface Address string on OOB controller
    required: false
    type: str
    version_added: 0.2.0
    version_added_collection: community.general

password:
    description:
    - Password for authentication with OOB controller
    required: true
    type: str

username:
    description:
    - User for authentication with OOB controller
    required: true
    type: str

boot_order:
    default: []
    description:
    - list of BootOptionReference strings specifying the BootOrder
    elements: str
    required: false
    type: list
    version_added: 0.2.0
    version_added_collection: community.general

nic_config:
    description:
    - setting dict of EthernetInterface on OOB controller
    required: false
    type: dict
    version_added: 0.2.0
    version_added_collection: community.general

resource_id:
    description:
    - The ID of the System, Manager or Chassis to modify
    required: false
    type: str
    version_added: 0.2.0
    version_added_collection: community.general

bios_attributes:
    default: {}
    description:
    - dictionary of BIOS attributes to update
    required: false
    type: dict
    version_added: 0.2.0
    version_added_collection: community.general

network_protocols:
    description:
    - setting dict of manager services to update
    required: false
    type: dict
    version_added: 0.2.0
    version_added_collection: community.general

bios_attribute_name:
    default: 'null'
    description:
    - name of BIOS attr to update (deprecated - use bios_attributes instead)
    required: false
    type: str

bios_attribute_value:
    default: 'null'
    description:
    - value of BIOS attr to update (deprecated - use bios_attributes instead)
    required: false
    type: raw

Outputs

msg:
  description: Message with action result or error description
  returned: always
  sample: Action was successful
  type: str