dellemc / dellemc.unity / 2.0.0 / module / host Manage Host operations on Unity | "added in version" 1.1.0 of dellemc.unity" Authors: Rajshree Khare (@kharer5) <ansible.team@dell.com>dellemc.unity.host (2.0.0) — module
Install with ansible-galaxy collection install dellemc.unity:==2.0.0
collections: - name: dellemc.unity version: 2.0.0
The Host module contains the operations Creation of a Host, Addition of initiators to Host, Removal of initiators from Host, Modification of host attributes, Get details of a Host, Deletion of a Host, Addition of network address to Host, Removal of network address from Host.
- name: Create empty Host dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_name: "ansible-test-host" host_os: "Linux" description: "ansible-test-host" state: "present"
- name: Create Host with Initiators dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_name: "ansible-test-host-1" host_os: "Linux" description: "ansible-test-host-1" initiators: - "iqn.1994-05.com.redhat:c38e6e8cfd81" - "20:00:00:90:FA:13:81:8D:10:00:00:90:FA:13:81:8D" initiator_state: "present-in-host" state: "present"
- name: Modify Host using host_id dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_id: "Host_253" new_host_name: "ansible-test-host-2" host_os: "Mac OS" description: "Ansible tesing purpose" state: "present"
- name: Add Initiators to Host dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_name: "ansible-test-host-2" initiators: - "20:00:00:90:FA:13:81:8C:10:00:00:90:FA:13:81:8C" initiator_state: "present-in-host" state: "present"
- name: Get Host details using host_name dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_name: "ansible-test-host-2" state: "present"
- name: Get Host details using host_id dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_id: "Host_253" state: "present"
- name: Delete Host dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_name: "ansible-test-host-2" state: "absent"
- name: Add network address to Host dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_name: "{{host_name}}" network_address: "192.168.1.2" network_address_state: "present-in-host" state: "present"
- name: Delete network address from Host dellemc.unity.host: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" host_name: "{{host_name}}" network_address: "192.168.1.2" network_address_state: "absent-in-host" state: "present"
port: default: 443 description: - Port number through which communication happens with Unity management server. type: int state: choices: - present - absent description: - State of the host. required: true type: str host_id: description: - Unique identifier of the host. - Host Id is auto generated during creation. - Except create, all other operations require either I(host_id) or Ihost_name). type: str host_os: choices: - AIX - Citrix XenServer - HP-UX - IBM VIOS - Linux - Mac OS - Solaris - VMware ESXi - Windows Client - Windows Server description: - Operating system running on the host. type: str password: description: - The password of the Unity management server. required: true type: str username: description: - The username of the Unity management server. required: true type: str host_name: description: - Name of the host. - Mandatory for host creation. type: str initiators: description: - List of initiators to be added/removed to/from host. elements: str type: list description: description: - Host description. type: str new_host_name: description: - New name for the host. - Only required in rename host operation. type: str unispherehost: description: - IP or FQDN of the Unity management server. required: true type: str validate_certs: aliases: - verifycert default: true description: - Boolean variable to specify whether or not to validate SSL certificate. - C(true) - Indicates that the SSL certificate should be verified. - C(false) - Indicates that the SSL certificate should not be verified. type: bool initiator_state: choices: - present-in-host - absent-in-host description: - State of the initiator. type: str network_address: description: - Network address to be added/removed to/from the host. - Enter valid IPV4 or host name. type: str network_address_state: choices: - present-in-host - absent-in-host description: - State of the Network address. type: str
changed: description: Whether or not the resource has changed. returned: always sample: true type: bool host_details: contains: description: description: Description about the host. type: str fc_host_initiators: contains: id: description: Unique identifier of the FC initiator path. type: str name: description: FC Qualified Name (WWN) of the initiator. type: str paths: contains: id: description: Unique identifier of the path. type: str is_logged_in: description: Indicates whether the host initiator is logged into the storage system. type: bool description: Details of the paths associated with the FC initiator. type: list description: Details of the FC initiators associated with the host. type: list host_luns: description: Details of luns attached to host. type: list id: description: The system ID given to the host. type: str iscsi_host_initiators: contains: id: description: Unique identifier of the ISCSI initiator path. type: str name: description: ISCSI Qualified Name (IQN) of the initiator. type: str paths: contains: id: description: Unique identifier of the path. type: str is_logged_in: description: Indicates whether the host initiator is logged into the storage system. type: bool description: Details of the paths associated with the ISCSI initiator. type: list description: Details of the ISCSI initiators associated with the host. type: list name: description: The name of the host. type: str network_addresses: description: List of network addresses mapped to the host. type: list os_type: description: Operating system running on the host. type: str type: description: HostTypeEnum of the host. type: str description: Details of the host. returned: When host exists. sample: auto_manage_type: HostManageEnum.UNKNOWN datastores: null description: ansible-test-host-1 existed: true fc_host_initiators: - id: HostInitiator_1 name: HostName_1 paths: - id: HostInitiator_1_Id1 is_logged_in: true - id: HostInitiator_1_Id2 is_logged_in: true hash: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER health: UnityHealth: hash: 8764429420954 host_container: null host_luns: [] host_polled_uuid: null host_pushed_uuid: null host_uuid: null host_v_vol_datastore: null id: Host_2198 iscsi_host_initiators: - id: HostInitiator_2 name: HostName_2 paths: - id: HostInitiator_2_Id1 is_logged_in: true - id: HostInitiator_2_Id2 is_logged_in: true last_poll_time: null name: ansible-test-host-1 network_addresses: [] os_type: Linux registration_type: null storage_resources: null tenant: null type: HostTypeEnum.HOST_MANUAL vms: null type: dict