dellemc / dellemc.powermax / 3.0.0 / module / host Manage host (initiator group) on PowerMax/VMAX Storage System | "added in version" 1.0.0 of dellemc.powermax" Authors: Vasudevu Lakhinana (@unknown) <ansible.team@dell.com>, Manisha Agrawal (@agrawm3) <ansible.team@dell.com>dellemc.powermax.host (3.0.0) — module
Install with ansible-galaxy collection install dellemc.powermax:==3.0.0
collections: - name: dellemc.powermax version: 3.0.0
Managing hosts on a PowerMax storage system includes creating a host with a set of initiators and host flags, adding and removing initiators to or from a host, modifying host flag values, renaming a host, and deleting a host.
- name: Create host with host_type 'default' dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_1" host_type: "default" state: 'present'
- name: Create host with host_type 'hpux' dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_2" host_type: "hpux" state: 'present'
- name: Create host with host_flags dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_3" initiators: - 1000000000000001 - 'host/HBA01' host_flags: spc2_protocol_version: true consistent_lun: true volume_set_addressing: 'unset' disable_q_reset_on_ua: false openvms: 'unset' state: 'present' initiator_state: 'present-in-host'
- name: Get host details dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_1" state: 'present'
- name: Adding initiator to host dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_1" initiators: - 1000000000000001 - 'host/HBA01' initiator_state: 'present-in-host' state: 'present'
- name: Removing initiator from host dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_1" initiators: - 1000000000000001 - 'host/HBA01' initiator_state: 'absent-in-host' state: 'present'
- name: Modify host using host_type dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_1" host_type: "hpux" state: 'present'
- name: Modify host using host_flags dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_1" host_flags: spc2_protocol_version: unset consistent_lun: unset volume_set_addressing: true disable_q_reset_on_ua: false openvms: false avoid_reset_broadcast: true state: 'present'
- name: Rename host dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_1" new_name: "ansible_test_1_host" state: 'present'
- name: Delete host dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "ansible_test_1_host" state: 'absent'
user: description: - The username of the Unisphere host. required: true type: str state: choices: - absent - present description: - Define whether the host should exist or not. - absent - indicates that the host should not exist in the system. - present - indicates that the host should exist in the system. required: true type: str timeout: default: 120 description: - Time after which the connection will get terminated. - It is to be mentioned in seconds. type: int new_name: description: - The new name of the host for the renaming function. No Special Character support except for _. Case sensitive for REST Calls. type: str password: description: - The password of the Unisphere host. required: true type: str host_name: description: - The name of the host. No Special Character support except for _. Case sensitive for REST Calls. - Creation of an empty host is allowed. required: true type: str host_type: choices: - default - hpux description: - Describing the OS type. required: false type: str serial_no: description: - The serial number of the PowerMax/VMAX array. It is a required parameter for all array-specific operations except for getting a list of arrays in the Gatherfacts module. required: true type: str host_flags: description: - Input as a yaml dictionary. - List of all host_flags- - 1. volume_set_addressing. - 2. disable_q_reset_on_ua. - 3. environ_set. - 4. avoid_reset_broadcast. - 5. openvms. - 6. scsi_3. - 7. spc2_protocol_version. - 8. scsi_support1. - 9. consistent_lun. - Possible values are true, false, unset (default state). required: false type: dict initiators: description: - List of Initiator WWN or IQN or alias to be added to or removed from the host. elements: str type: list universion: choices: - 91 - 92 - 100 - 101 description: - Unisphere version, currently '91', '92', '100' and '101' versions are supported. required: false type: int verifycert: description: - Specifies system whether to validate SSL certificate or not, Values can be True or False or a custom file path for SSL certificate with .pem extension or .cer with base 64 encoding. required: true type: str unispherehost: description: - IP or FQDN of the Unisphere host required: true type: str initiator_state: choices: - absent-in-host - present-in-host description: - Define whether the initiators should be present or absent on the host. - absent-in-host - indicates that the initiators should not exist on the host. - present-in-host - indicates that the initiators should exist on the host. - Required when creating a host with initiators or adding and removing initiators to or from an existing host. type: str
changed: description: Whether or not the resource has changed. returned: always type: bool host_details: contains: bw_limit: description: Bandwidth limit of the host. type: int consistent_lun: description: Flag for consistent LUN in host. type: bool disabled_flags: description: List of any disabled port flags overridden by the initiator. type: list enabled_flags: description: List of any enabled port flags overridden by the initiator. type: list hostId: description: Host ID. type: str hostgroup: description: List of host groups that the host is associated with. type: list initiator: description: List of initiators present in the host. type: list maskingview: description: List of masking view in which the host group is present. type: list num_of_hostgroups: description: Number of host groups associated with the host. type: int num_of_initiators: description: Number of initiators present in the host. type: int num_of_masking_views: description: Number of masking views associated with the host. type: int num_of_powerpath_hosts: description: Number of PowerPath hosts associated with the host. type: int port_flags_override: description: Whether any of the initiator port flags are overridden. type: bool type: description: Type of initiator. type: str description: Details of the host. returned: When host exist. type: complex