dellemc.unity.host module – Manage Host operations on Unity
Note
This module is part of the dellemc.unity collection (version 2.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install dellemc.unity
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.unity.host
.
New in dellemc.unity 1.1.0
Synopsis
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.
Requirements
The below requirements are needed on the host that executes this module.
A Dell Unity Storage device version 5.1 or later.
Ansible-core 2.14 or later.
Python 3.9, 3.10 or 3.11.
Storops Python SDK 1.2.11.
Parameters
Parameter |
Comments |
---|---|
Host description. |
|
Unique identifier of the host. Host Id is auto generated during creation. Except create, all other operations require either host_id or Ihost_name). |
|
Name of the host. Mandatory for host creation. |
|
Operating system running on the host. Choices:
|
|
State of the initiator. Choices:
|
|
List of initiators to be added/removed to/from host. |
|
Network address to be added/removed to/from the host. Enter valid IPV4 or host name. |
|
State of the Network address. Choices:
|
|
New name for the host. Only required in rename host operation. |
|
The password of the Unity management server. |
|
Port number through which communication happens with Unity management server. Default: |
|
State of the host. Choices:
|
|
IP or FQDN of the Unity management server. |
|
The username of the Unity management server. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
Notes
Note
The check_mode is not supported.
The modules present in this collection named as ‘dellemc.unity’ are built to support the Dell Unity storage platform.
Examples
- 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"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Whether or not the resource has changed. Returned: always Sample: |
|
Details of the host. Returned: When host exists. Sample: |
|
Description about the host. Returned: success |
|
Details of the FC initiators associated with the host. Returned: success |
|
Unique identifier of the FC initiator path. Returned: success |
|
FC Qualified Name (WWN) of the initiator. Returned: success |
|
Details of the paths associated with the FC initiator. Returned: success |
|
Unique identifier of the path. Returned: success |
|
Indicates whether the host initiator is logged into the storage system. Returned: success |
|
Details of luns attached to host. Returned: success |
|
The system ID given to the host. Returned: success |
|
Details of the ISCSI initiators associated with the host. Returned: success |
|
Unique identifier of the ISCSI initiator path. Returned: success |
|
ISCSI Qualified Name (IQN) of the initiator. Returned: success |
|
Details of the paths associated with the ISCSI initiator. Returned: success |
|
Unique identifier of the path. Returned: success |
|
Indicates whether the host initiator is logged into the storage system. Returned: success |
|
The name of the host. Returned: success |
|
List of network addresses mapped to the host. Returned: success |
|
Operating system running on the host. Returned: success |
|
HostTypeEnum of the host. Returned: success |