ibm.spectrum_virtualize.ibm_svc_host module – This module manages hosts 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_svc_host
.
Note
The ibm.spectrum_virtualize collection has been renamed to ibm.storage_virtualize and will eventually be removed from Ansible. 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.0.0
Synopsis
Ansible interface to manage ‘mkhost’, ‘chhost’, and ‘rmhost’ host commands.
Parameters
Parameter |
Comments |
---|---|
The hostname or management IP of the Spectrum Virtualize storage system. |
|
Domain for the Spectrum Virtualize storage system. Valid when hostname is used for the parameter clustername. |
|
List of Initiator WWPNs to be added to the host. The complete list of WWPNs must be provided. The parameters fcwwpn and iscsiname are mutually exclusive. Required when state=present, to create or modify a Fibre Channel (FC) host. |
|
Specifies the name of the host cluster to which the host object is to be added. A host cluster must exist before a host object can be added to it. Parameters hostcluster and nohostcluster are mutually exclusive. Valid when state=present, to create or modify a host. |
|
Specifies a set of one or more input/output (I/O) groups from which the host can access the volumes. Once specified, this parameter cannot be modified. Valid when state=present, to create a host. |
|
List of Initiator IQNs to be added to the host. IQNs are separated by comma. The complete list of IQNs must be provided. The parameters fcwwpn and iscsiname are mutually exclusive. Valid when state=present, to create host. |
|
Path of debug log file. |
|
Specifies a name or label for the new host object. |
|
If specified as Parameters hostcluster and nohostcluster are mutually exclusive. Valid when state=present, to modify an existing host. Choices:
|
|
List of initiator NQNs to be added to the host. Each NQN is separated by a comma. The complete list of NQNs must be provided. Required when protocol=rdmanvme, to create. Valid when state=present, to create or modify a host. |
|
Specifies the old name of the host while renaming. Valid when state=present, to rename an existing host. |
|
REST API password for the Spectrum Virtualize storage system. The parameters username and password are required if not using token to authenticate a user. |
|
Specifies the portset to be associated with the host. Valid when state=present, to create or modify a host. |
|
Specifies the protocol used by the host to communicate with the storage system. Only ‘scsi’ protocol is supported. Valid when state=present, to create a host. Choices:
|
|
Specifies the site name of the host. Valid when state=present, to create or modify a host. |
|
Creates or updates ( Choices:
|
|
The authentication token to verify a user on the Spectrum Virtualize storage system. To generate a token, use the ibm.spectrum_virtualize.ibm_svc_auth module. |
|
Specifies the type of host. Valid when state=present, to create or modify a host. |
|
REST API username for the Spectrum Virtualize storage system. The parameters username and password are required if not using token to authenticate a user. |
|
Validates certification. Choices:
|
Notes
Note
This module supports
check_mode
.
Examples
- name: Define a new iSCSI host
ibm.spectrum_virtualize.ibm_svc_host:
clustername: "{{clustername}}"
domain: "{{domain}}"
username: "{{username}}"
password: "{{password}}"
log_path: /tmp/playbook.debug
name: host4test
state: present
iscsiname: iqn.1994-05.com.redhat:2e358e438b8a
iogrp: 0:1:2:3
protocol: scsi
type: generic
site: site-name
portset: portset0
- name: Add a host to an existing host cluster
ibm.spectrum_virtualize.ibm_svc_host:
clustername: "{{clustername}}"
domain: "{{domain}}"
username: "{{username}}"
password: "{{password}}"
log_path: /tmp/playbook.debug
name: host4test
state: present
hostcluster: hostcluster0
- name: Define a new FC host
ibm.spectrum_virtualize.ibm_svc_host:
clustername: "{{clustername}}"
domain: "{{domain}}"
username: "{{username}}"
password: "{{password}}"
log_path: /tmp/playbook.debug
name: host4test
state: present
fcwwpn: 100000109B570216:1000001AA0570266
iogrp: 0:1:2:3
protocol: scsi
type: generic
site: site-name
- name: Rename an existing host
ibm.spectrum_virtualize.ibm_svc_host:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
old_name: "host4test"
name: "new_host_name"
state: "present"
- name: Create an iSCSI host
ibm.spectrum_virtualize.ibm_svc_host:
clustername: "{{clustername}}"
domain: "{{domain}}"
username: "{{username}}"
password: "{{password}}"
log_path: /tmp/playbook.debug
name: host_name
iscsiname: iqn.1994-05.com.redhat:2e358e438b8a,iqn.localhost.hostid.7f000001
state: present
- name: Delete a host
ibm.spectrum_virtualize.ibm_svc_host:
clustername: "{{clustername}}"
domain: "{{domain}}"
username: "{{username}}"
password: "{{password}}"
log_path: /tmp/playbook.debug
name: new_host_name
state: absent