huawei.enterprise.hw_enterprise_initiator module – Initiator(iSCSI AND FC) operations for Huawei Enterprise Storage
Note
This module is part of the huawei.enterprise collection (version 2.0.0).
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 huawei.enterprise.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: huawei.enterprise.hw_enterprise_initiator.
Synopsis
Supports the provisioning operations on a initiator such as create, modify, delete and get the details of a initiator.
Supports query all initiators on storage.
Requirements
The below requirements are needed on the host that executes this module.
Huawei Dorado v5/v6/v7 and OceanStor v5/v6/v7 Storage
Parameters
Parameter |
Comments |
|---|---|
Parameters used to extend those not currently supported by the module. Configuration needs to be based on the REST API documentation for storage. If necessary, you can contact the plugin technical support for assistance. |
|
Initiator switchover mode. Needs to be delivered only when third-party multipathing software is enabled. v5 Storage does not support Choices:
|
|
Parameter required for all query operations. The response will include the storage parameters that match the indicate filter criteria. Choices:
|
|
IP or FQDN of the huawei enterprise management system. MultiIP config as ip1,ip2 |
|
Initiator unique id, Mutually exclusive with “name”, Priority is higher than name. Required for create operation. |
|
Multipathing type. It defaults to Choices:
|
|
Initiator alias name. Mutually exclusive with id. |
|
Initiator new alias name. Configure when need modify initiator name. |
|
Associate or disassociate operate for host. Choices:
|
|
Host ID, Required for create operation or associate initiator to host. |
|
The password of the PowerStore host. |
|
Initiator path type. Needs to be delivered only when third-party multipathing software is enabled. Choices:
|
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Special mode type of the initiator. Required when failover_mode is Needs to be delivered only when third-party multipathing software is enabled. Choices:
|
|
Define whether the Initiator should exist or not. Choices:
|
|
Port number for the Huawei Enterprise array. If not passed, it will take 8088 as default. Default: |
|
Which type initiator you want to operate. Choices:
|
|
Whether to write plugin log to local filesystem. Choices:
|
|
The username of the PowerStore host. |
|
The path of the SSL certificate variable to specify whether to validate SSL certificate or not. If don’t set means no need to verify ssl cert. |
|
id of storage vstore. It defaults to 0:SystemVstore if not specified. |
Notes
Note
The check_mode is not supported.
Initiator must be disassociate from host when need delete.
FCinitiator name is a hexadecimal value that contains 16 characters comprised of uppercase letters A to F, lowercase letters a to f, or digits 0 to 9, but cannot all be 0, F, or f.The modules present in this collection named as ‘huawei.enterprise’ are built to support the Huawei Enterprise Storage System.
Examples
---
tasks:
- name: Create Initiator
register: ini_info
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "< iqn-id >"
type: "{{ ini_type }}"
name: "< ini_name >"
multipath_type: "< default | third-party >"
path_type: "< preferred path | non-preferred path >"
failover_mode: "< early-version ALUA >"
special_mode_type: "< mode 0 >"
parent_id: "< host_id >"
vstore_id: "< vstore_id >"
state: "present"
- name: Modify Initiator Common Param By ID
register: ini_info
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "< iqn-id >"
type: "{{ ini_type }}"
new_name: "< ini_new_name >"
multipath_type: "< default | third-party >"
path_type: "< preferred path | non-preferred path >"
failover_mode: "< early-version ALUA >"
special_mode_type: "< mode 0 >"
state: "present"
- name: Modify Initiator Common Param By Name
register: ini_info
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< ini_name >"
type: "{{ ini_type }}"
new_name: "< ini_new_name >"
multipath_type: "< default | third-party >"
path_type: "< preferred path | non-preferred path >"
failover_mode: "< early-version ALUA >"
special_mode_type: "< mode 0 >"
vstore_id: "< vstore_id >"
state: "present"
- name: Associate Initiator To Host By ID
register: ini_info
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "< iqn-id >"
type: "{{ ini_type }}"
operation: "associate"
parent_id: "< host_id >"
state: "present"
- name: Associate Initiator To Host By Name
register: ini_info
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< initiator_name >"
type: "{{ ini_type }}"
operation: "associate"
parent_id: "< host_id >"
vstore_id: "< vstore_id >"
state: "present"
- name: Disassociate Initiator To Host By ID
register: ini_info
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "< iqn-id >"
type: "{{ ini_type }}"
operation: "disassociate"
state: "present"
- name: Disassociate Initiator To Host By Name
register: ini_info
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< initiator_name >"
type: "{{ ini_type }}"
operation: "disassociate"
vstore_id: "< vstore_id >"
state: "present"
- name: Query Initiator Detail By ID
register: ini_info
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "< iqn-id >"
type: "{{ ini_type }}"
filter:
- id
- name
- type
- vstore_name
- vstore_id
- parent_id
- parent_name
- host_ip
- running_status
- multipath_type
- path_type
- special_mode_type
- failover_mode
state: "present"
- name: Query Multi Initiator
register: all_initiator
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
type: "{{ ini_type }}"
vstore_id: "< vstore_id >"
filter:
- id
- name
- type
- vstore_name
- vstore_id
- parent_id
- parent_name
- host_ip
- running_status
- multipath_type
- path_type
- special_mode_type
- failover_mode
state: "present"
- name: Delete Initiator By Name
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
name: "< initiator_name >"
type: "{{ ini_type }}"
vstore_id: "< vstore_id >"
state: "absent"
- name: Delete Initiator By ID
huawei.enterprise.hw_enterprise_initiator:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "< iqn-xx >"
type: "{{ ini_type }}"
state: "absent"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
playbook action lists Returned: always Sample: |
|
Whether or not the resource has changed. Returned: always Sample: |
|
Details of the initiator. Returned: When initiator exists else return {} Sample: |
|
Switchover mode of initiator. Returned: success |
|
IP address of initiator associated host. Returned: success |
|
The system generated ID given to the Initiator. Returned: success |
|
Is initiator associate to host. Returned: success |
|
Type of multipath. Returned: success |
|
Name of the Initiator. Returned: success |
|
ID of initiator associated host. Returned: success |
|
Name of initiator associated host. Returned: success |
|
Path type of initiator. Returned: success |
|
running status of the Initiator. Returned: success |
|
Special mode type of an initiator. Returned: success |
|
Type of the Initiator, FC or iSCSI. Returned: success |
|
ID of storage vstore. Returned: success |
|
Name of storage vstore. Returned: success |
|
task execute remark Returned: always Sample: |