community.general.redfish_config (8.5.0) — module

Manages Out-Of-Band controllers using Redfish APIs

Authors: Jose Delarosa (@jose-delarosa), T S Kushal (@TSKushal)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

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
    community.general.redfish_config:
      category: Systems
      command: SetBiosAttributes
      resource_id: 437XR1138R2
      bios_attributes:
        PxeDev1EnDis: 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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Disable Host Interface
    community.general.redfish_config:
      category: Manager
      command: SetHostInterface
      hostinterface_config:
        InterfaceEnabled: false
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - 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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Enable SecureBoot
    community.general.redfish_config:
      category: Systems
      command: EnableSecureBoot
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Set SecureBoot
    community.general.redfish_config:
      category: Systems
      command: SetSecureBoot
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
      secure_boot_enable: True
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Delete All Volumes
    community.general.redfish_config:
      category: Systems
      command: DeleteVolumes
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
      storage_subsystem_id: "DExxxxxx"
      volume_ids: ["volume1", "volume2"]
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Create Volume
    community.general.redfish_config:
      category: Systems
      command: CreateVolume
      baseuri: "{{ baseuri }}"
      username: "{{ username }}"
      password: "{{ password }}"
      storage_subsystem_id: "DExxxxxx"
      volume_details:
        Name: "MR Volume"
        RAIDType: "RAID0"
        Drives:
          - "/redfish/v1/Systems/1/Storage/DE00B000/Drives/1"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Set service identification to {{ service_id }}
    community.general.redfish_config:
      category: Manager
      command: SetServiceIdentification
      service_id: "{{ service_id }}"
      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:
    description:
    - Timeout in seconds for HTTP requests to OOB controller.
    - The default value for this param is C(10) but that is being deprecated and it will
      be replaced with C(60) in community.general 9.0.0.
    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 authenticating to OOB controller.
    type: str

username:
    description:
    - Username for authenticating to OOB controller.
    type: str

auth_token:
    description:
    - Security token for authenticating to OOB controller.
    type: str
    version_added: 2.3.0
    version_added_collection: community.general

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:
    default: {}
    description:
    - Setting dict of EthernetInterface on OOB controller.
    required: false
    type: dict
    version_added: 0.2.0
    version_added_collection: community.general

service_id:
    description:
    - ID of the manager to update.
    required: false
    type: str
    version_added: 8.4.0
    version_added_collection: community.general

volume_ids:
    default: []
    description:
    - List of IDs of volumes to be deleted.
    elements: str
    required: false
    type: list
    version_added: 7.3.0
    version_added_collection: community.general

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

volume_details:
    default: {}
    description:
    - Setting dict of volume to be created.
    required: false
    type: dict
    version_added: 7.5.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

sessions_config:
    default: {}
    description:
    - Setting dict of Sessions.
    required: false
    type: dict
    version_added: 5.7.0
    version_added_collection: community.general

hostinterface_id:
    description:
    - Redfish HostInterface instance ID if multiple HostInterfaces are present.
    required: false
    type: str
    version_added: 4.1.0
    version_added_collection: community.general

network_protocols:
    default: {}
    description:
    - Setting dict of manager services to update.
    required: false
    type: dict
    version_added: 0.2.0
    version_added_collection: community.general

strip_etag_quotes:
    default: false
    description:
    - Removes surrounding quotes of etag used in C(If-Match) header of C(PATCH) requests.
    - Only use this option to resolve bad vendor implementation where C(If-Match) only
      matches the unquoted etag string.
    type: bool
    version_added: 3.7.0
    version_added_collection: community.general

secure_boot_enable:
    default: true
    description:
    - Setting parameter to enable or disable SecureBoot.
    required: false
    type: bool
    version_added: 7.5.0
    version_added_collection: community.general

hostinterface_config:
    default: {}
    description:
    - Setting dict of HostInterface on OOB controller.
    required: false
    type: dict
    version_added: 4.1.0
    version_added_collection: community.general

storage_subsystem_id:
    default: ''
    description:
    - Id of the Storage Subsystem on which the volume is to be created.
    required: false
    type: str
    version_added: 7.3.0
    version_added_collection: community.general

Outputs

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