hitachivantara.vspone_block.vsp.hv_vsp_one_server module – Manages servers on Hitachi VSP One storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 4.3.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.vsp.hv_vsp_one_server
.
New in hitachivantara.vspone_block 4.3.0
Synopsis
This module enables register, modification, and deletion of servers, as well as various server operations.
Supports various server operations depending on the specified state parameter.
Utilizes the Hitachi Vantara VSP One Simple API for server management across VSP one B2x and VSP E series models.
For usage examples, visit https://github.com/hitachi-vantara/vspone-block-ansible/blob/main/playbooks/vsp_direct/vsp_one_server.yml
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
Parameters
Parameter |
Comments |
---|---|
Information required to establish a connection to the storage system. |
|
IP address or hostname of the storage system. |
|
Token used to operate on locked resources. |
|
Password for authentication. This is a required field. |
|
Username for authentication. This is a required field. |
|
Configuration parameters for the server operation. |
|
List of HBA configurations. |
|
HBA WWN address. |
|
iSCSI name. |
|
List of host group configurations. |
|
Host group identifier. |
|
Host group name. |
|
Port identifier. |
|
Indicates if the server is reserved. Choices:
|
|
List of iSCSI target configurations. |
|
Port identifier. |
|
iSCSI target name. |
|
List of iSCSI target configurations. |
|
iSCSI target identifier. |
|
iSCSI target name. |
|
Port identifier. |
|
Whether to keep LUN configuration. Choices:
|
|
Server nickname specification. |
|
Operating system type of the server. Choices:
|
|
List of OS type option identifiers. |
|
List of path configurations. |
|
HBA WWN address. |
|
iSCSI name. |
|
List of port identifiers. |
|
List of port identifiers. |
|
Server protocol type. Choices:
|
|
Server identifier. |
|
Defines the server operation type. Available options include Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Specifies whether the module operates in check mode. |
Examples
- name: Register a FC server with HBA WWN
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
nick_name: "WebServer01"
protocol: "FC"
os_type: "Linux"
hbas:
- hba_wwn: "50060e8010203040"
- name: Register an iSCSI server with iSCSI name
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
nick_name: "DatabaseServer01"
protocol: "iSCSI"
os_type: "Windows"
hbas:
- iscsi_name: "iqn.1991-05.com.microsoft:server01"
- name: Register server with host groups configuration
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
nick_name: "VMwareCluster01"
protocol: "FC"
os_type: "VMware"
host_groups:
- host_group_name: "VMware_HG01"
port_id: "CL1-A"
- host_group_name: "VMware_HG02"
port_id: "CL1-B"
- name: Register server with multiple HBAs and paths configuration
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
nick_name: "AppServer01"
protocol: "FC"
os_type: "Linux"
hbas:
- hba_wwn: "50060e8010203040"
- hba_wwn: "50060e8010203041"
paths:
- port_ids: ["CL1-A", "CL1-B"]
hba_wwn: "50060e8010203040"
- port_ids: ["CL2-A", "CL2-B"]
hba_wwn: "50060e8010203041"
- name: Register iSCSI server with multiple iSCSI names and paths
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
nick_name: "HybridServer01"
protocol: "iSCSI"
os_type: "Linux"
hbas:
- iscsi_name: "iqn.1991-05.com.example:server01-iscsi1"
- iscsi_name: "iqn.1991-05.com.example:server01-iscsi2"
paths:
- port_ids: ["CL1-A"]
iscsi_name: "iqn.1991-05.com.example:server01-iscsi1"
- port_ids: ["CL1-B"]
iscsi_name: "iqn.1991-05.com.example:server01-iscsi2"
- name: Update existing server nick_name with server_id
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 123
nick_name: "UpdatedServerName"
- name: Update existing server settings like os type os type options using server_id
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 123
os_type: "Windows"
os_type_options: [1, 2]
- name: Add host groups to existing server
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: add_host_groups
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 123
host_groups:
- host_group_name: "NewHostGroup01"
port_id: "CL2-A"
- name: Add HBA to existing server using server_id
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: add_hba
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 123
hbas:
- hba_wwn: "50060e8010203042"
- name: Remove HBA from server
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: remove_hba
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 12
hbas:
- hba_wwn: "50060e8010203042"
- name: Add path to server
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: add_path
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 12
paths:
- port_ids: ["CL1-C", "CL1-D"]
hba_wwn: "50060e8010203040"
- name: Remove path from server
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: remove_path
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 12
paths:
- port_ids: ["CL1-C"]
hba_wwn: "50060e8010203040"
- name: Sync server nickname with host group
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: sync_server_nick_name
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 123
- name: Register reserved server with specific configuration
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
nick_name: "ReservedServer01"
protocol: "FC"
os_type: "Solaris"
is_reserved: true
keep_lun_config: true
os_type_options: [1, 2]
- name: Change the iSCSI target settings for existing server (change target name)
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: present
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 123
iscsi_targets:
- port_id: "CL1-A"
iscsi_target_name: "iqn.1992-04.com.hitachi:target01"
- port_id: "CL1-B"
iscsi_target_name: "iqn.1992-04.com.hitachi:target02"
- name: Delete server using server_id and keep lun configuration
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: absent
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
server_id: 123
keep_lun_config: true
- name: Delete server using nick_name.
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: absent
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
nick_name: "WebServer01"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Server information returned after operation Returned: always |
|
Server compatibility status Returned: always Sample: |
|
Indicates if server has non-fullmesh LU paths Returned: always Sample: |
|
Indicates if server has unaligned OS type options Returned: always Sample: |
|
Indicates if server has unaligned OS types Returned: always Sample: |
|
Server identifier Returned: always Sample: |
|
Indicates if server configuration is inconsistent Returned: always Sample: |
|
Indicates if server is reserved Returned: always Sample: |
|
Indicates if server modification is in progress Returned: always Sample: |
|
Server nickname Returned: always Sample: |
|
Number of paths configured for the server Returned: always Sample: |
|
Number of volumes attached to the server Returned: always Sample: |
|
Operating system type of the server Returned: always Sample: |
|
List of OS type option identifiers Returned: always Sample: |
|
List of server path configurations Returned: always |
|
HBA WWN address Returned: always Sample: |
|
iSCSI name Returned: always Sample: |
|
List of port identifiers Returned: always Sample: |
|
Server protocol type Returned: always Sample: |
|
Total capacity in GB Returned: always Sample: |
|
Used capacity in GB Returned: always Sample: |