community.general.wdc_redfish_command (8.5.0) — module

Manages WDC UltraStar Data102 Out-Of-Band controllers using Redfish APIs

| "added in version" 5.4.0 of community.general"

Authors: Mike Moerk (@mikemoerk)

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 perform an action.

Manages OOB controller firmware. For example, Firmware Activate, Update and Activate.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Firmware Activate (required after SimpleUpdate to apply the new firmware)
  community.general.wdc_redfish_command:
    category: Update
    command: FWActivate
    ioms: "{{ ioms }}"
    username: "{{ username }}"
    password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Firmware Activate with individual IOMs specified
  community.general.wdc_redfish_command:
    category: Update
    command: FWActivate
    ioms:
      - iom1.wdc.com
      - iom2.wdc.com
    username: "{{ username }}"
    password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Firmware Activate with baseuri specified
  community.general.wdc_redfish_command:
    category: Update
    command: FWActivate
    baseuri: "iom1.wdc.com"
    username: "{{ username }}"
    password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: Update and Activate (orchestrates firmware update and activation with a single command)
  community.general.wdc_redfish_command:
    category: Update
    command: UpdateAndActivate
    ioms: "{{ ioms }}"
    username: "{{ username }}"
    password: "{{ password }}"
    update_image_uri: "{{ update_image_uri }}"
    update_creds:
      username: operator
      password: supersecretpwd
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Turn on enclosure indicator LED
  community.general.wdc_redfish_command:
    category: Chassis
    resource_id: Enclosure
    command: IndicatorLedOn
    username: "{{ username }}"
    password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Turn off IOM A indicator LED
  community.general.wdc_redfish_command:
    category: Chassis
    resource_id: IOModuleAFRU
    command: IndicatorLedOff
    username: "{{ username }}"
    password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Turn on Power Supply B indicator LED
  community.general.wdc_redfish_command:
    category: Chassis
    resource_id: PowerSupplyBFRU
    command: IndicatorLedOn
    username: "{{ username }}"
    password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Turn on External Fan 3 indicator LED
  community.general.wdc_redfish_command:
    category: Chassis
    resource_id: FanExternalFRU3
    command: IndicatorLedOn
    username: "{{ username }}"
    password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Turn on Internal Fan indicator LED
  community.general.wdc_redfish_command:
    category: Chassis
    resource_id: FanInternalFRU
    command: IndicatorLedOn
    username: "{{ username }}"
    password: "{{ password }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set chassis to Low Power Mode
  community.general.wdc_redfish_command:
    category: Chassis
    resource_id: Enclosure
    command: PowerModeLow
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set chassis to Normal Power Mode
  community.general.wdc_redfish_command:
    category: Chassis
    resource_id: Enclosure
    command: PowerModeNormal

Inputs

    
ioms:
    description:
    - List of IOM FQDNs for the enclosure.  Must include this or O(baseuri).
    elements: str
    type: list

baseuri:
    description:
    - Base URI of OOB controller.  Must include this or O(ioms).
    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

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

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

auth_token:
    description:
    - Security token for authentication with OOB controller.
    type: str

resource_id:
    description:
    - ID of the component to modify, such as V(Enclosure), V(IOModuleAFRU), V(PowerSupplyBFRU),
      V(FanExternalFRU3), or V(FanInternalFRU).
    required: false
    type: str
    version_added: 5.4.0
    version_added_collection: community.general

update_creds:
    description:
    - The credentials for retrieving the update image.
    required: false
    suboptions:
      password:
        description:
        - The password for retrieving the update image.
        required: false
        type: str
      username:
        description:
        - The username for retrieving the update image.
        required: false
        type: str
    type: dict

update_image_uri:
    description:
    - The URI of the image for the update.
    required: false
    type: str

Outputs

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