dellemc.powerstore.dellemc_powerstore_host (1.3.0) — module

Manage host on PowerStore storage system.

| "added in version" 1.0.0 of dellemc.powerstore"

Authors: Manisha Agrawal (@agrawm3) <ansible.team@dell.com>

preview | supported by community

Install collection

Install with ansible-galaxy collection install dellemc.powerstore:==1.3.0


Add to requirements.yml

  collections:
    - name: dellemc.powerstore
      version: 1.3.0

Description

Managing host on PowerStore storage system includes create host with a set of initiators, add/remove initiators from host, rename host and delete host.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Create host
    dellemc_powerstore_host:
      array_ip: "{{array_ip}}"
      verifycert: "{{verifycert}}"
      user: "{{user}}"
      password: "{{password}}"
      host_name: "{{host_name}}"
      os_type: 'Windows'
      initiators:
        -21:00:00:24:ff:31:e9:fc
      state: 'present'
      initiator_state: 'present-in-host'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Get host details by name
    dellemc_powerstore_host:
      array_ip: "{{array_ip}}"
      verifycert: "{{verifycert}}"
      user: "{{user}}"
      password: "{{password}}"
      host_name: "{{host_name}}"
      state: 'present'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Get host details by id
    dellemc_powerstore_host:
      array_ip: "{{array_ip}}"
      verifycert: "{{verifycert}}"
      user: "{{user}}"
      password: "{{password}}"
      host_id: "{{host_id}}"
      state: 'present'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Add initiators to host
    dellemc_powerstore_host:
      array_ip: "{{array_ip}}"
      verifycert: "{{verifycert}}"
      user: "{{user}}"
      password: "{{password}}"
      host_name: "{{host_name}}"
      initiators:
        -21:00:00:24:ff:31:e9:ee
      initiator_state: 'present-in-host'
      state: 'present'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Remove initiators from host
    dellemc_powerstore_host:
      array_ip: "{{array_ip}}"
      verifycert: "{{verifycert}}"
      user: "{{user}}"
      password: "{{password}}"
      host_name: "{{host_name}}"
      initiators:
        -21:00:00:24:ff:31:e9:ee
      initiator_state: 'absent-in-host'
      state: 'present'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Rename host
    dellemc_powerstore_host:
      array_ip: "{{array_ip}}"
      verifycert: "{{verifycert}}"
      user: "{{user}}"
      password: "{{password}}"
      host_name: "{{host_name}}"
      new_name: "{{new_host_name}}"
      state: 'present'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Delete host
    dellemc_powerstore_host:
      array_ip: "{{array_ip}}"
      verifycert: "{{verifycert}}"
      user: "{{user}}"
      password: "{{password}}"
      host_name: "{{new_host_name}}"
      state: 'absent'

Inputs

    
user:
    description:
    - The username of the PowerStore host.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    description:
    - Define whether the host should exist or not.
    - present - indicates that the host should exist in system.
    - absent - indicates that the host should not exist in system.
    required: true
    type: str

host_id:
    description:
    - The 36 character long host id automatically generated when a host is created.
    - Use either host_id or host_name for modify and delete tasks.
    - host_id cannot be used while creating host, as it is generated by the array after
      creation of host.
    required: false
    type: str

os_type:
    choices:
    - Windows
    - Linux
    - ESXi
    - AIX
    - HP-UX
    - Solaris
    description:
    - Operating system of the host.
    - Required when creating a host
    - OS type cannot be modified for a given host.
    type: str

array_ip:
    description:
    - IP or FQDN of the PowerStore management system.
    required: true
    type: str

new_name:
    description:
    - The new name of host for renaming function. This value must contain 128 or fewer
      printable Unicode characters.
    - Cannot be specified when creating a host.
    type: str

password:
    description:
    - The password of the PowerStore host.
    required: true
    type: str

host_name:
    description:
    - The host name. This value must contain 128 or fewer printable Unicode characters.
    - Creation of an empty host is not allowed.
    - Required when creating a host.
    - Use either host_id or host_name for modify and delete tasks.
    type: str

initiators:
    description:
    - List of Initiator WWN or IQN to be added or removed from the host.
    - Subordinate initiators in a host can only be of one type, either FC or iSCSI.
    - Required when creating a host.
    elements: str
    type: list

verifycert:
    choices:
    - true
    - false
    description:
    - Boolean variable to specify whether to validate SSL certificate or not.
    - True - indicates that the SSL certificate should be verified. Set the environment
      variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
    - False - indicates that the SSL certificate should not be verified.
    required: true
    type: bool

initiator_state:
    choices:
    - present-in-host
    - absent-in-host
    description:
    - Define whether the initiators should be present or absent in host.
    - present-in-host - indicates that the initiators should exist on host.
    - absent-in-host - indicates that the initiators should not exist on host.
    - Required when creating a host with initiators or adding/removing initiators to/from
      existing host.
    type: str

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  type: bool
host_details:
  contains:
    description:
      description: Description about the host.
      type: str
    host_group_id:
      description: The host group ID of host.
      type: str
    host_initiators:
      contains:
        port_name:
          description: Name of the port.
          type: str
        port_type:
          description: The type of the port.
          type: str
      description: The initiator details of this host.
      type: complex
    id:
      description: The system generated ID given to the host.
      type: str
    name:
      description: Name of the host.
      type: str
    os_type:
      description: The os type of the host.
      type: str
  description: Details of the host.
  returned: When host exists
  type: complex