dellemc / dellemc.powermax / 1.6.1 / module / dellemc_powermax_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> preview | supported by communitydellemc.powermax.dellemc_powermax_host (1.6.1) — module
Install with ansible-galaxy collection install dellemc.powermax:==1.6.1
collections: - name: dellemc.powermax version: 1.6.1
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: - 10000090fa7b4e85 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: - 10000090fa3d303e 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: - 10000090fa3d303e 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. - present - indicates that the host should exist in the system - absent - indicates that the host should not exist in the system required: true type: str 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 (default or hpux) 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 to be added to the host or removed from the host. elements: str type: list universion: choices: - 91 - 92 description: - Unisphere version, currently '91' and '92' versions are supported. required: false type: int 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. - False - indicates that the SSL certificate should not be verified. required: true type: bool unispherehost: description: - IP or FQDN of the Unisphere host required: true type: str initiator_state: choices: - present-in-host - absent-in-host description: - Define whether the initiators should be present or absent on the host. - present-in-host - indicates that the initiators should exist on the host - absent-in-host - indicates that the initiators should not 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