ibm.spectrum_virtualize.ibm_svcinfo_command module – This module implements SSH Client which helps to run svcinfo CLI command on IBM Spectrum Virtualize family storage systems

Note

This module is part of the ibm.spectrum_virtualize collection (version 2.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install ibm.spectrum_virtualize.

To use it in a playbook, specify: ibm.spectrum_virtualize.ibm_svcinfo_command.

Note

The ibm.spectrum_virtualize collection has been renamed to ibm.storage_virtualize and will be removed from Ansible 12. If you use content from ibm.spectrum_virtualize, please update FQCNs in your playbooks and roles! When creating new playbooks or roles, directly use content from ibm.storage_virtualize instead.

New in ibm.spectrum_virtualize 1.2.0

Synopsis

  • Runs single svcinfo CLI command on IBM Spectrum Virtualize family storage systems. Filter options like filtervalue or pipe ‘|’ with grep, awk, and others are not supported in the command in this module. Paramiko must be installed to use this module.

Parameters

Parameter

Comments

clustername

string / required

The hostname or management IP of the Spectrum Virtualize storage system.

command

string

Single svcinfo CLI command to be executed on Spectrum Virtualize storage system. Each command must start with svcinfo keyword.

key_filename

string

SSH client private key filename. By default, ~/.ssh/id_rsa is used.

log_path

string

Path of debug log file.

password

string / required

Password for the Spectrum Virtualize storage system.

username

string / required

Username for the Spectrum Virtualize storage system.

usesshkey

string

For key-pair based SSH connection, set this field as 'yes'. Provide full path of keyfile in key_filename field. If not provided, default path of SSH key is used.

Choices:

  • "yes"

  • "no" ← (default)

Examples

- name: Run svcinfo CLI command using SSH client with password
  ibm.spectrum_virtualize.ibm_svcinfo_command:
    command: "svcinfo lsuser {{user}}"
    clustername: "{{clustername}}"
    username: "{{username}}"
    password: "{{password}}"
    log_path: /tmp/ansible.log
- name: Run svcinfo CLI command using passwordless SSH Client
  ibm.spectrum_virtualize.ibm_svcinfo_command:
    command: "svcinfo lsuser"
    usesshkey: "yes"
    clustername: "{{clustername}}"
    username: "{{username}}"
    password:
    log_path: /tmp/ansible.log

Authors

  • Shilpi Jain (@Shilpi-Jain1)