ibm.storage_virtualize.ibm_svc_host module – This module manages hosts on IBM Storage Virtualize family systems
Note
This module is part of the ibm.storage_virtualize collection (version 2.6.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.storage_virtualize
.
To use it in a playbook, specify: ibm.storage_virtualize.ibm_svc_host
.
New in ibm.storage_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 Storage Virtualize system. |
|
Domain for the Storage Virtualize system. Valid when hostname is used for the parameter clustername. |
|
Specifies the name of the draft partition to be assigned to the host. Valid when state=present, to modify a host. Supported from Storage Virtualize family systems 8.6.3.0 or later. |
|
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 draftpartition and nodraftpartition are mutually exclusive. Valid when state=present, to modify an existing host. Supported from Storage Virtualize family systems 8.6.3.0 or later. Choices:
|
|
If specified as Parameters hostcluster and nohostcluster are mutually exclusive. Valid when state=present, to modify an existing host. Choices:
|
|
If specified as Parameters partition and nopartition are mutually exclusive. Valid when state=present, to modify an existing host. Supported from Storage Virtualize family systems 8.6.1.0 or later. 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 or tcpnvme, 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. |
|
Specifies the storage partition to be associated with the host. Valid when state=present, to create or modify a host. Supported from Storage Virtualize family systems 8.6.1.0 or later. |
|
REST API password for the Storage Virtualize 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 Storage Virtualize system. To generate a token, use the ibm.storage_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 Storage Virtualize 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.storage_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.storage_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.storage_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.storage_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.storage_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: Create a tcpnvme host
ibm.storage_virtualize.ibm_svc_host:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: host_name
protocol: tcpnvme
nqn: nqn.2014-08.org.nvmexpress:NVMf:uuid:644f51bf-8432-4f59-bb13-5ada20c06397
state: present
- name: Delete a host
ibm.storage_virtualize.ibm_svc_host:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: new_host_name
state: absent
- name: Add existing host to draft partition
ibm.storage_virtualize.ibm_svc_host:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: host_name
state: prersent
draftpartition: partition_name
- name: Remove a host from a draft partition
ibm.storage_virtualize.ibm_svc_host:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: host_name
state: present
nodraftpartition: 'True'
- name: Create a fcnvme host
ibm.storage_virtualize.ibm_svc_host:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: /tmp/playbook.debug
name: host_name
protocol: fcnvme
nqn: nqn.2014-08.org.nvmexpress:b2071fa4-4356-410f-a4ae-7ebfab5b0e90
portset: portset_name
state: present