hmc_command – Execute HMC command

Synopsis

Generic module that can execute any HMC CLI command.

The given command will be executed on all selected HMCs.

Information about the HMC CLI commands can be found at https://www.ibm.com/docs/en/power10/7063-CR1?topic=hmc-commands.

Parameters

hmc_host (True, str, None)

The IP address or hostname of the HMC.

hmc_auth (True, dict, None)

Username and Password credential of the HMC.

username (True, str, None)

Username of the HMC to log in.

password (optional, str, None)

Password of the HMC.

cmd (True, str, None)

The command to be executed on HMC.

Notes

Note

  • This module supports passwordless authentication.

Examples

- name: Execute a command on HMC
  ibm.power_hmc.hmc_command:
    hmc_host: "{{ inventory_hostname }}"
    hmc_auth:
      username: '{{ ansible_user }}'
      password: '{{ hmc_password }}'
    cmd: <cmd>

Return Values

Command_output (always, str, )

Respective command output.

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by community.

Authors

  • Navinakumar Kandakur (@nkandak1)