community.general.ocapi_info (8.5.0) — module

Manages Out-Of-Band controllers using Open Composable API (OCAPI)

| "added in version" 6.3.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 OCAPI URIs locally and sends them to remote OOB controllers to get information back.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Get job status
    community.general.ocapi_info:
      category: Status
      command: JobStatus
      baseuri: "http://iom1.wdc.com"
      jobName: FirmwareUpdate
      username: "{{ username }}"
      password: "{{ password }}"

Inputs

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

command:
    description:
    - Command to execute on OOB controller.
    required: true
    type: str

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

job_name:
    description:
    - Name of job for fetching status.
    type: str

password:
    description:
    - Password for authenticating to OOB controller.
    required: true
    type: str

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

proxy_slot_number:
    description: For proxied inband requests, the slot number of the IOM.  Only applies
      if O(baseuri) is a proxy server.
    type: int

Outputs

details:
  description: Details of the relevant operation.  Applies to O(command=JobStatus).
  elements: str
  returned: when supported
  type: list
msg:
  description: Message with action result or error description.
  returned: always
  sample: Action was successful
  type: str
operationHealth:
  description: Health of the operation.  Applies to O(command=JobStatus).  See OCAPI
    documentation for details.
  returned: when supported
  sample: OK
  type: str
operationHealthId:
  description: 'Integer value for health of the operation (corresponds to RV(operationHealth)).
    Applies to O(command=JobStatus). See OCAPI documentation for details.

    '
  returned: when supported
  sample: OK
  type: str
operationStatus:
  description: Status of the relevant operation.  Applies to O(command=JobStatus).  See
    OCAPI documentation for details.
  returned: when supported
  sample: Activate needed
  type: str
operationStatusId:
  description: Integer value of status (corresponds to operationStatus).  Applies
    to O(command=JobStatus).  See OCAPI documentation for details.
  returned: when supported
  sample: 65540
  type: int
percentComplete:
  description: Percent complete of the relevant operation.  Applies to O(command=JobStatus).
  returned: when supported
  sample: 99
  type: int
status:
  description: Dictionary containing status information.  See OCAPI documentation
    for details.
  returned: when supported
  sample:
    Details:
    - None
    Health:
    - ID: 5
      Name: OK
    State:
      ID: 16
      Name: In service
  type: dict