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.9.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

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.

ca_cert

string

Path to a CA certificate file or directory on the Ansible control node used to verify the storage system SSL certificate.

Required when connection_info.validate_cert is true and the storage system uses a self-signed or privately issued certificate.

Accepts a PEM file path or a directory of hashed CA certificates.

client_cert

string

Path to client SSL certificate file or CA certificate directory for mutual TLS authentication.

Must be provided together with connection_info.client_key.

client_key

string

Path to the client private key file for mutual TLS authentication.

Must be provided together with connection_info.client_cert.

password

string

Password for authentication. This is a required field.

suppress_validate_cert_warning

boolean

Whether to suppress the SSL certificate validation warning.

When set to false (default), a warning is displayed if certificate validation is disabled.

Set to true to suppress the warning.

Choices:

  • false ← (default)

  • true

username

string

Username for authentication. This is a required field.

validate_cert

boolean

Whether to validate the storage system SSL certificate.

When set to false (default), certificate validation is disabled. A security warning will be displayed unless connection_info.suppress_validate_cert_warning is true.

Set to true to enable certificate validation. When true, provide connection_info.ca_cert if the storage system uses a self-signed certificate.

Note: Starting with major version 5.0, the default value will change to true. It is strongly recommended to enable certificate validation in production environments.

Choices:

  • false ← (default)

  • true

spec

dictionary / required

Configuration parameters for the server operation.

bulk_hbas

list / elements=dictionary

List of server HBA payloads for state=add_hba_bulk.

hbas

list / elements=dictionary / required

List of HBAs to add to the server.

hba_wwn

string

HBA WWN address.

iscsi_name

string

iSCSI name.

server_id

integer / required

Identifier of the server to add HBAs to.

bulk_paths

list / elements=dictionary

List of server path payloads for state=add_path_bulk.

paths

list / elements=dictionary / required

List of paths to add to the server.

hba_wwn

string

HBA WWN address associated with the path.

iscsi_name

string

iSCSI name associated with the path.

port_ids

list / elements=string / required

List of port identifiers for the path.

server_id

integer / required

Identifier of the server to add paths to.

bulk_remove_paths

list / elements=dictionary

List of server path payloads for state=remove_path_bulk.

paths

list / elements=dictionary / required

List of paths to remove from the server.

hba_wwn

string

HBA WWN address associated with the path.

iscsi_name

string

iSCSI name associated with the path.

port_ids

list / elements=string / required

List of port identifiers for the path.

server_id

integer / required

Identifier of the server to remove paths from.

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:

  • false

  • true

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:

  • false

  • true

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:

  • "Linux"

  • "HP-UX"

  • "Solaris"

  • "AIX"

  • "VMware"

  • "Windows"

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:

  • "FC"

  • "iSCSI"

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.

servers

list / elements=dictionary

List of servers to register in one API call when state=create_servers. When count=1 (default) each entry creates a single server and may include hbas and paths. When count is greater than 1 the nickname is used as a name prefix and count identical server registrations are created (nickname_01…nickname_N); hbas and paths are not allowed in this mode because HBA WWNs and iSCSI names are physically unique per host — use state=add_hba_bulk and state=add_path_bulk after creation instead. Maximum value for count is 50 per task.

count

integer

Number of servers to create. Allowed range is 1–50. Servers are named <nickname>_1 … <nickname>_N starting from 1. Cannot be combined with end_index. Cannot be combined with hbas or paths when greater than 1. Mutually exclusive with end_index; use start_index+end_index for an explicit range.

end_index

integer

Last index in the server name sequence (inclusive). Must be paired with start_index. The range [start_index, end_index] must not exceed 50 servers. Cannot be combined with count.

hbas

list / elements=dictionary

HBAs to register on the created server immediately after creation. Only valid when creating a single server (no count/start_index/end_index or count=1). HBA WWNs and iSCSI names are unique per physical host and cannot be shared across multiple servers.

hba_wwn

string

HBA WWN address (FC).

iscsi_name

string

iSCSI initiator name (iSCSI).

is_reserved

boolean

Whether the server is reserved.

Choices:

  • false

  • true

nickname

string / required

Server nickname. When creating multiple servers this value is used as a prefix; servers are named <nickname>_1, <nickname>_2, etc., zero-padded to the number of digits in the largest index.

os_type

string

Operating system type of the server.

Choices:

  • "Linux"

  • "HP-UX"

  • "Solaris"

  • "AIX"

  • "VMware"

  • "Windows"

os_type_options

list / elements=integer

List of OS type option identifiers.

paths

list / elements=dictionary

Paths to register on the created server immediately after HBAs. Only valid when creating a single server. Paths are bound to specific HBA WWNs or iSCSI names which are unique per host.

hba_wwn

string

HBA WWN address associated with the path (FC).

iscsi_name

string

iSCSI initiator name associated with the path (iSCSI).

port_ids

list / elements=string / required

List of port identifiers for this path.

protocol

string

Connection protocol for the server.

Choices:

  • "FC"

  • "iSCSI"

start_index

integer

First index in the server name sequence. Must be paired with either end_index or count. When paired with count, creates servers <nickname>_start … <nickname>_start+count-1. Defaults to 1 when count is used alone.

state

string

Defines the server operation type. Available options include present, absent, sync_server_nick_name, sync_server_nickname, add_host_groups, add_hba, remove_hba, add_path, and remove_path. Bulk operations are available via create_servers, add_hba_bulk, add_path_bulk, and remove_path_bulk. sync_server_nick_name will be deprecated in favor of sync_server_nickname.

Choices:

  • "present" ← (default)

  • "absent"

  • "sync_server_nick_name"

  • "sync_server_nickname"

  • "add_host_groups"

  • "add_hba"

  • "remove_hba"

  • "add_path"

  • "remove_path"

  • "change_iscsi_target_settings"

  • "create_servers"

  • "add_hba_bulk"

  • "add_path_bulk"

  • "remove_path_bulk"

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"

- name: Bulk create multiple servers in a single request
  hitachivantara.vspone_block.vsp.hv_vsp_one_server:
    state: create_servers
    connection_info:
      address: vsp.company.com
      username: "admin"
      password: "password"
    spec:
      servers:
        - nickname: "BulkServer01"
          protocol: "FC"
          os_type: "Linux"
          os_type_options: [1, 2]
        - nickname: "BulkServer02"
          protocol: "iSCSI"
          os_type: "Windows"
          is_reserved: true

- name: Bulk create servers with inline HBAs and paths
  hitachivantara.vspone_block.vsp.hv_vsp_one_server:
    state: create_servers
    connection_info:
      address: vsp.company.com
      username: "admin"
      password: "password"
    spec:
      servers:
        - nickname: "AppServer01"
          protocol: "FC"
          os_type: "Linux"
          hbas:
            - hba_wwn: "50060e8010203040"
          paths:
            - port_ids: ["CL1-A", "CL1-B"]
              hba_wwn: "50060e8010203040"
        - nickname: "DBServer01"
          protocol: "iSCSI"
          os_type: "Windows"
          hbas:
            - iscsi_name: "iqn.1991-05.com.example:dbserver01"
          paths:
            - port_ids: ["CL1-A"]
              iscsi_name: "iqn.1991-05.com.example:dbserver01"

- name: Bulk create N servers using count (creates WebServer_1, WebServer_2, WebServer_3)
  hitachivantara.vspone_block.vsp.hv_vsp_one_server:
    state: create_servers
    connection_info:
      address: vsp.company.com
      username: "admin"
      password: "password"
    spec:
      servers:
        - nickname: "WebServer"
          count: 3                   # creates WebServer_1, WebServer_2, WebServer_3
          protocol: "FC"
          os_type: "Linux"
          os_type_options: [1, 2]

- name: Bulk create servers using start_index and end_index (creates WebServer_05 to WebServer_10)
  hitachivantara.vspone_block.vsp.hv_vsp_one_server:
    state: create_servers
    connection_info:
      address: vsp.company.com
      username: "admin"
      password: "password"
    spec:
      servers:
        - nickname: "WebServer"
          start_index: 5
          end_index: 10             # creates WebServer_05, WebServer_06 … WebServer_10
          protocol: "FC"
          os_type: "Linux"

- name: Bulk create servers using start_index and count (creates WebServer_05, WebServer_06, WebServer_07)
  hitachivantara.vspone_block.vsp.hv_vsp_one_server:
    state: create_servers
    connection_info:
      address: vsp.company.com
      username: "admin"
      password: "password"
    spec:
      servers:
        - nickname: "WebServer"
          start_index: 5
          count: 3                  # creates WebServer_05, WebServer_06, WebServer_07
          protocol: "FC"
          os_type: "Linux"

- name: Bulk add HBAs to multiple servers in a single request
  hitachivantara.vspone_block.vsp.hv_vsp_one_server:
    state: add_hba_bulk
    connection_info:
      address: vsp.company.com
      username: "admin"
      password: "password"
    spec:
      bulk_hbas:
        - server_id: 101
          hbas:
            - hba_wwn: "50060e8010203040"
            - hba_wwn: "50060e8010203041"
        - server_id: 102
          hbas:
            - iscsi_name: "iqn.1991-05.com.example:server102-iscsi1"

- name: Bulk add paths to multiple servers in a single request
  hitachivantara.vspone_block.vsp.hv_vsp_one_server:
    state: add_path_bulk
    connection_info:
      address: vsp.company.com
      username: "admin"
      password: "password"
    spec:
      bulk_paths:
        - server_id: 101
          paths:
            - port_ids: ["CL1-A", "CL1-B"]
              hba_wwn: "50060e8010203040"
        - server_id: 102
          paths:
            - port_ids: ["CL2-A"]
              iscsi_name: "iqn.1991-05.com.example:server102-iscsi1"

- name: Bulk remove paths from multiple servers in a single request
  hitachivantara.vspone_block.vsp.hv_vsp_one_server:
    state: remove_path_bulk
    connection_info:
      address: vsp.company.com
      username: "admin"
      password: "password"
    spec:
      bulk_remove_paths:
        - server_id: 101
          paths:
            - port_ids: ["CL1-A"]
              hba_wwn: "50060e8010203040"
        - server_id: 102
          paths:
            - port_ids: ["CL2-A"]
              iscsi_name: "iqn.1991-05.com.example:server102-iscsi1"

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: true

has_unaligned_os_type_options

boolean

Indicates if server has unaligned OS type options

Returned: always

Sample: true

has_unaligned_os_types

boolean

Indicates if server has unaligned OS types

Returned: always

Sample: true

id

integer

Server identifier

Returned: always

Sample: 13

is_inconsistent

boolean

Indicates if server configuration is inconsistent

Returned: always

Sample: false

is_reserved

boolean

Indicates if server is reserved

Returned: always

Sample: false

modification_in_progress

boolean

Indicates if server modification is in progress

Returned: always

Sample: false

nick_name

string

Deprecated. Use nickname instead.

Returned: always

Sample: "WebServer414"

nickname

string

Server nickname

Returned: always

Sample: "WebServer414"

number_of_paths

integer

Number of paths configured for the server

Returned: always

Sample: 2

number_of_volumes

integer

Number of volumes attached to the server

Returned: always

Sample: 1

os_type

string

Operating system type of the server

Returned: always

Sample: "Linux"

os_type_options

list / elements=integer

List of OS type option identifiers

Returned: always

Sample: [68]

paths

list / elements=dictionary

List of server path configurations

Returned: always

hba_wwn

string

HBA WWN address

Returned: always

Sample: "210003e08b0256f9"

iscsi_name

string

iSCSI name

Returned: always

Sample: ""

port_ids

list / elements=string

List of port identifiers

Returned: always

Sample: ["CL1-A"]

protocol

string

Server protocol type

Returned: always

Sample: "FC"

total_capacity

integer

Total capacity in GB

Returned: always

Sample: 50

used_capacity

integer

Used capacity in GB

Returned: always

Sample: 0

Authors

  • Hitachi Vantara LTD (@hitachi-vantara)