hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node module – Manages Hitachi SDS block storage system compute nodes.
Note
This module is part of the hitachivantara.vspone_block collection (version 3.4.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 hitachivantara.vspone_block
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node
.
New in hitachivantara.vspone_block 3.0.0
Synopsis
This module allows for the creation, update and deletion of compute node, adding iqn initiators to compute node, remove iqn initiators from compute node, attach volumes to compute node, detach volumes from compute node.
It supports various compute node operations based on the specified task level.
For examples go to URL https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/sds_block_direct/compute_node.yml
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.8
Parameters
Parameter |
Comments |
---|---|
Information required to establish a connection to the storage system. |
|
IP address or hostname of the storage system. |
|
Type of connection to the storage system. Choices:
|
|
Password for authentication. |
|
Username for authentication. |
|
Specification for the compute node task. |
|
The array of NQN Initiators. |
|
ID of the compute node. |
|
The array of iSCSI Initiators. |
|
Name of the compute node. |
|
The OS type of the compute node. |
|
Will delete the volumes that are not attached to any compute node. Choices:
|
|
The state of the compute node task. Choices:
|
|
The array of name of volumes. |
|
The level of the compute node task. Choices are Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Determines if the module should run in check mode. |
Examples
- name: Create compute node
hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node:
state: present
connection_info:
address: sdsb.company.com
username: "admin"
password: "password"
spec:
name: "computenode1"
os_type: "VMWARE"
iscsi_initiators: ["iqn.1991-05.com.hitachi:test-iscsi-iqn1", "iqn.1991-05.com.hitachi:test-iscsi-iqn2"]
volumes: ["test-volume1", "test-volume2"]
- name: Delete compute node by ID
hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node:
state: present
connection_info:
address: sdsb.company.com
username: "admin"
password: "password"
spec:
id: "3d971bb3-40fd-4cb5-bf68-2010b30aa74d"
- name: Delete compute node by name
hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node:
state: present
connection_info:
address: sdsb.company.com
username: "admin"
password: "password"
spec:
name: "computenode1"
should_delete_all_volumes: true
- name: Update compute node name
hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node:
state: present
connection_info:
address: sdsb.company.com
username: "admin"
password: "password"
spec:
id: "3d971bb3-40fd-4cb5-bf68-2010b30aa74d"
name: "computenode1a"
os_type: "LINUX"
- name: Add iqn initiators to compute node
hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node:
state: present
connection_info:
address: sdsb.company.com
username: "admin"
password: "password"
spec:
state: "add_iscsi_initiator"
name: "computenode1"
os_type: "VMWARE"
iscsi_initiators: ["iqn.1991-05.com.hitachi:test-iscsi-iqn3", "iqn.1991-05.com.hitachi:test-iscsi-iqn4"]
- name: Remove iqn initiators from compute node
hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node:
state: present
connection_info:
address: sdsb.company.com
username: "admin"
password: "password"
spec:
state: "remove_iscsi_initiator"
name: "computenode1"
os_type: "VMWARE"
iscsi_initiators: ["iqn.1991-05.com.hitachi:test-iscsi-iqn3", "iqn.1991-05.com.hitachi:test-iscsi-iqn4"]
- name: Attach volumes to compute node
hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node:
state: present
connection_info:
address: sdsb.company.com
username: "admin"
password: "password"
spec:
state: "attach_volume"
name: "computenode1"
volumes: ["test-volume3", "test-volume4"]
- name: Detach volumes from compute node
hitachivantara.vspone_block.sds_block.hv_sds_block_compute_node:
state: present
connection_info:
address: sdsb.company.com
username: "admin"
password: "password"
spec:
state: "detach_volume"
name: "computenode1"
volumes: ["test-volume3", "test-volume4"]
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Dictionary containing the discovered properties of the compute nodes. Returned: always |
|
A list of compute nodes. Returned: success |
|
Information about the compute node. Returned: success |
|
Unique identifier for the compute node. Returned: success Sample: |
|
Logical Unit Number. Returned: success Sample: |
|
Nickname of the compute node. Returned: success Sample: |
|
Number of paths. Returned: success Sample: |
|
Number of volumes. Returned: success Sample: |
|
Operating system type. Returned: success Sample: |
|
List of paths. Returned: success |
|
HBA name. Returned: success Sample: |
|
List of port IDs. Returned: success Sample: |
|
Total capacity in MB. Returned: success Sample: |
|
Used capacity in MB. Returned: success Sample: |
|
VPS ID. Returned: success Sample: |
|
VPS name. Returned: success Sample: |
|
Information about the volumes. Returned: success |
|
Unique identifier for the volume. Returned: success Sample: |
|
Name of the volume. Returned: success Sample: |