ibm.spectrum_virtualize.ibm_svctask_command module – This module implements SSH Client which helps to run svctask CLI command(s) 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_svctask_command
.
Note
The ibm.spectrum_virtualize collection has been renamed to ibm.storage_virtualize and will be removed from Ansible 12. The content of ibm.spectrum_virtualize will be replaced by redirects to ibm.storage_virtualize in Ansible 10. 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 svctask CLI command(s) on IBM Spectrum Virtualize Family storage systems. In case any svctask command fails while running this module, then the module stops processing further commands in the list. Paramiko must be installed to use this module.
Parameters
Parameter |
Comments |
---|---|
The hostname or management IP of the Spectrum Virtualize storage system. |
|
A list containing svctask CLI commands to be executed on storage. Each command must start with ‘svctask’ keyword. |
|
SSH client private key filename. By default, ~/.ssh/id_rsa is used. |
|
Path of debug log file. |
|
Password for the Spectrum Virtualize storage system. |
|
Username for the Spectrum Virtualize storage system. |
|
For key-pair based SSH connection, set this field as “yes”. Provide full path of key in key_filename field. If not provided, default path of SSH key is used. Choices:
|
Examples
- name: Run svctask CLI commands using SSH client with password
ibm.spectrum_virtualize.ibm_svctask_command:
command: [
"svctask mkvdisk -name {{ volname }} -mdiskgrp '{{ pool }}' -easytier '{{ easy_tier }}' -size {{ size }} -unit {{ unit }}",
"svctask rmvdisk {{ volname }}"
]
clustername: "{{clustername}}"
username: "{{username}}"
password: "{{password}}"
log_path: /tmp/ansible.log
- name: Run svctask CLI command using passwordless SSH Client
ibm.spectrum_virtualize.ibm_svctask_command:
command: [
"svctask mkvdisk -name vol0 -mdiskgrp pool0 -easytier off -size 1 -unit gb",
"svctask rmvdisk vol0"
]
clustername: "{{clustername}}"
username: "{{username}}"
password:
usesshkey: yes
log_path: /tmp/ansible.log