hitachivantara.vspone_block.vsp.hv_vsp_one_server module – Manages servers on VSP E series, VSP One Block 20 series, and VSP One Block 80 series storage systems.
Note
This module is part of the hitachivantara.vspone_block collection (version 4.8.1).
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 Virtual Storage Platform One Simple API for server management across VSP E series, VSP One B20 series, and VSP One B80 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 |
|---|---|
connection_info dictionary / required | Information required to establish a connection to the storage system. |
|
address string / required |
IP address or hostname of the storage system. |
|
api_token string |
Token used to operate on locked resources. |
|
password string |
Password for authentication. This is a required field. |
|
username string |
Username for authentication. This is a required field. |
spec dictionary / required | Configuration parameters for the server operation. |
|
hbas list / elements=dictionary |
List of HBA configurations. Required for the Register a FC server with HBA WWN /Register an iSCSI server with iSCSI names /Register server with multiple HBAs and paths configuration /Register iSCSI server with multiple HBAs and paths /Register reserved server with specific configuration /Add HBA to existing FC server /Add iSCSI HBA to existing iSCSI server /Remove HBA from FC server /Remove iSCSI HBA from iSCSI server /Register HP-UX server with comprehensive configuration tasks. |
|
hba_wwn string |
HBA WWN address. Required for the Register a FC server with HBA WWN /Register server with multiple HBAs and paths configuration /Register reserved server with specific configuration /Add HBA to existing FC server /Remove HBA from FC server /Register HP-UX server with comprehensive configuration tasks. |
|
iscsi_name string |
iSCSI name. Required for the Register an iSCSI server with iSCSI names /Register iSCSI server with multiple HBAs and paths /Add iSCSI HBA to existing iSCSI server /Remove iSCSI HBA from iSCSI server tasks. |
|
host_groups list / elements=dictionary |
List of host group configurations. Required for the Register server with host groups configuration /Add host groups to existing server /Register HP-UX server with comprehensive configuration tasks. |
|
host_group_id integer |
Host group identifier. |
|
host_group_name string |
Host group name. Required for the Register server with host groups configuration /Add host groups to existing server /Register HP-UX server with comprehensive configuration tasks. |
|
port_id string |
Port identifier. Required for the Register server with host groups configuration /Add host groups to existing server /Register HP-UX server with comprehensive configuration tasks. |
|
is_reserved boolean |
Indicates if the server is reserved. Required for the Register a basic server with minimal configuration /Register reserved server with specific configuration tasks. Choices:
|
|
iscsi_target_settings list / elements=dictionary |
List of iSCSI target configurations. Required for the Change the iSCSI target settings for existing server tasks. |
|
port_id string / required |
Port identifier. Required for the Change the iSCSI target settings for existing server task. |
|
target_iscsi_name string / required |
iSCSI target name. Required for the Change the iSCSI target settings for existing server task. |
|
iscsi_targets list / elements=dictionary |
List of iSCSI target configurations. |
|
iscsi_target_id integer |
iSCSI target identifier. |
|
iscsi_target_name string |
iSCSI target name. |
|
port_id string |
Port identifier. |
|
keep_lun_config boolean |
Whether to keep LUN configuration. Required for the Register HP-UX server with comprehensive configuration /Delete server by server_id and keep lun configuration tasks. Choices:
|
|
nickname aliases: nick_name string |
Server nickname specification. Required for the Register a basic server with minimal configuration /Register a FC server with HBA WWN /Register an iSCSI server with iSCSI names /Register server with host groups configuration /Register server with multiple HBAs and paths configuration /Register iSCSI server with multiple HBAs and paths /Register reserved server with specific configuration /Update existing server nickname (using server_id) /Register HP-UX server with comprehensive configuration /Delete server using nickname tasks. |
|
os_type string |
Operating system type of the server. Required for the Register a basic server with minimal configuration /Register a FC server with HBA WWN /Register an iSCSI server with iSCSI names /Register server with host groups configuration /Register server with multiple HBAs and paths configuration /Register iSCSI server with multiple HBAs and paths /Register reserved server with specific configuration /Update existing server settings like os type options using server_id /Register HP-UX server with comprehensive configuration tasks. Choices:
|
|
os_type_options list / elements=integer |
List of OS type option identifiers. Required for the Register reserved server with specific configuration /Update existing server settings like os type options using server_id tasks. |
|
paths list / elements=dictionary |
List of path configurations. Required for the Register server with multiple HBAs and paths configuration /Register iSCSI server with multiple HBAs and paths /Add path to server /Remove path from server /Register HP-UX server with comprehensive configuration tasks. |
|
hba_wwn string |
HBA WWN address. Required for the Register server with multiple HBAs and paths configuration /Add path to server /Remove path from server /Register HP-UX server with comprehensive configuration tasks. |
|
iscsi_name string |
iSCSI name. Required for the Register iSCSI server with multiple HBAs and paths tasks |
|
port_ids list / elements=string / required |
List of port identifiers. Required for the Register server with multiple HBAs and paths configuration /Register iSCSI server with multiple HBAs and paths /Add path to server /Remove path from server /Register HP-UX server with comprehensive configuration tasks. |
|
port_ids list / elements=string |
List of port identifiers. |
|
protocol string |
Server protocol type. Required for the Register a basic server with minimal configuration /Register a FC server with HBA WWN /Register an iSCSI server with iSCSI names /Register server with host groups configuration /Register server with multiple HBAs and paths configuration /Register iSCSI server with multiple HBAs and paths /Register reserved server with specific configuration /Register HP-UX server with comprehensive configuration tasks. Choices:
|
|
server_id integer |
Server identifier. Required for the Update existing server nickname (using server_id) /Update existing server settings like os type options using server_id /Add host groups to existing server /Add HBA to existing FC server /Add iSCSI HBA to existing iSCSI server /Remove HBA from FC server /Remove iSCSI HBA from iSCSI server /Add path to server /Remove path from server /Sync server nickname /Change the iSCSI target settings for existing server /Delete server by server_id and keep lun configuration tasks. |
state string | Defines the server operation type. Available options include Choices:
|
Attributes
Attribute | Support | Description |
|---|---|---|
check_mode | 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:
nickname: "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:
nickname: "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:
nickname: "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:
nickname: "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:
nickname: "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 nickname 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
nickname: "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_nickname
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:
nickname: "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 nickname.
hitachivantara.vspone_block.vsp.hv_vsp_one_server:
state: absent
connection_info:
address: vsp.company.com
username: "admin"
password: "password"
spec:
nickname: "WebServer01"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
server dictionary | Server information returned after operation Returned: always |
|
compatibility string |
Server compatibility status Returned: always Sample: |
|
has_non_fullmesh_lu_paths boolean |
Indicates if server has non-fullmesh LU paths Returned: always Sample: |
|
has_unaligned_os_type_options boolean |
Indicates if server has unaligned OS type options Returned: always Sample: |
|
has_unaligned_os_types boolean |
Indicates if server has unaligned OS types Returned: always Sample: |
|
id integer |
Server identifier Returned: always Sample: |
|
is_inconsistent boolean |
Indicates if server configuration is inconsistent Returned: always Sample: |
|
is_reserved boolean |
Indicates if server is reserved Returned: always Sample: |
|
modification_in_progress boolean |
Indicates if server modification is in progress Returned: always Sample: |
|
nickname string |
Server nickname Returned: always Sample: |
|
number_of_paths integer |
Number of paths configured for the server Returned: always Sample: |
|
number_of_volumes integer |
Number of volumes attached to the server Returned: always Sample: |
|
os_type string |
Operating system type of the server Returned: always Sample: |
|
os_type_options list / elements=integer |
List of OS type option identifiers Returned: always Sample: |
|
paths list / elements=dictionary |
List of server path configurations Returned: always |
|
hba_wwn string |
HBA WWN address Returned: always Sample: |
|
iscsi_name string |
iSCSI name Returned: always Sample: |
|
port_ids list / elements=string |
List of port identifiers Returned: always Sample: |
|
protocol string |
Server protocol type Returned: always Sample: |
|
total_capacity integer |
Total capacity in GB Returned: always Sample: |
|
used_capacity integer |
Used capacity in GB Returned: always Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/hitachivantara/vspone_block/vsp.hv_vsp_one_server_module.html