ibm.storage_virtualize.ibm_svc_host (2.3.1) — module

This module manages hosts on IBM Storage Virtualize family systems

| "added in version" 1.0.0 of ibm.storage_virtualize"

Authors: Sreshtant Bohidar (@Sreshtant-Bohidar), Rohit Kumar (@rohitk-github)

Install collection

Install with ansible-galaxy collection install ibm.storage_virtualize:==2.3.1


Add to requirements.yml

  collections:
    - name: ibm.storage_virtualize
      version: 2.3.1

Description

Ansible interface to manage 'mkhost', 'chhost', and 'rmhost' host commands.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
nqn:
    description:
    - 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 I(protocol=rdmanvme or tcpnvme), to create.
    - Valid when I(state=present), to create or modify a host.
    type: str
    version_added: 1.12.0
    version_added_collection: ibm.storage_virtualize

name:
    description:
    - Specifies a name or label for the new host object.
    required: true
    type: str

site:
    description:
    - Specifies the site name of the host.
    - Valid when I(state=present), to create or modify a host.
    type: str

type:
    description:
    - Specifies the type of host.
    - Valid when I(state=present), to create or modify a host.
    type: str

iogrp:
    description:
    - 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 I(state=present), to create a host.
    type: str

state:
    choices:
    - absent
    - present
    description:
    - Creates or updates (C(present)) or removes (C(absent)) a host.
    required: true
    type: str

token:
    description:
    - The authentication token to verify a user on the Storage Virtualize system.
    - To generate a token, use the M(ibm.storage_virtualize.ibm_svc_auth) module.
    type: str
    version_added: 1.5.0
    version_added_collection: ibm.storage_virtualize

domain:
    description:
    - Domain for the Storage Virtualize system.
    - Valid when hostname is used for the parameter I(clustername).
    type: str

fcwwpn:
    description:
    - List of Initiator WWPNs to be added to the host. The complete list of WWPNs must
      be provided.
    - The parameters I(fcwwpn) and I(iscsiname) are mutually exclusive.
    - Required when I(state=present), to create or modify a Fibre Channel (FC) host.
    type: str

portset:
    description:
    - Specifies the portset to be associated with the host.
    - Valid when I(state=present), to create or modify a host.
    type: str
    version_added: 1.12.0
    version_added_collection: ibm.storage_virtualize

log_path:
    description:
    - Path of debug log file.
    type: str

old_name:
    description:
    - Specifies the old name of the host while renaming.
    - Valid when I(state=present), to rename an existing host.
    type: str
    version_added: 1.9.0
    version_added_collection: ibm.storage_virtualize

password:
    description:
    - REST API password for the Storage Virtualize system.
    - The parameters I(username) and I(password) are required if not using I(token) to
      authenticate a user.
    type: str

protocol:
    choices:
    - scsi
    - rdmanvme
    - tcpnvme
    description:
    - Specifies the protocol used by the host to communicate with the storage system.
      Only 'scsi' protocol is supported.
    - Valid when I(state=present), to create a host.
    type: str

username:
    description:
    - REST API username for the Storage Virtualize system.
    - The parameters I(username) and I(password) are required if not using I(token) to
      authenticate a user.
    type: str

iscsiname:
    description:
    - 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 I(fcwwpn) and I(iscsiname) are mutually exclusive.
    - Valid when I(state=present), to create host.
    type: str

partition:
    description:
    - Specifies the storage partition to be associated with the host.
    - Valid when I(state=present), to create or modify a host.
    - Supported from Storage Virtualize family systems 8.6.1.0 or later.
    type: str
    version_added: 2.1.0
    version_added_collection: ibm.storage_virtualize

clustername:
    description:
    - The hostname or management IP of the Storage Virtualize system.
    required: true
    type: str

hostcluster:
    description:
    - 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 I(hostcluster) and I(nohostcluster) are mutually exclusive.
    - Valid when I(state=present), to create or modify a host.
    type: str
    version_added: 1.5.0
    version_added_collection: ibm.storage_virtualize

nopartition:
    description:
    - If specified as C(True), the host object is removed from the storage partition.
    - Parameters I(partition) and I(nopartition) are mutually exclusive.
    - Valid when I(state=present), to modify an existing host.
    - Supported from Storage Virtualize family systems 8.6.1.0 or later.
    type: bool
    version_added: 2.1.0
    version_added_collection: ibm.storage_virtualize

nohostcluster:
    description:
    - If specified as C(True), host object is removed from the host cluster.
    - Parameters I(hostcluster) and I(nohostcluster) are mutually exclusive.
    - Valid when I(state=present), to modify an existing host.
    type: bool
    version_added: 1.5.0
    version_added_collection: ibm.storage_virtualize

validate_certs:
    default: false
    description:
    - Validates certification.
    type: bool