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

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.

hba_wwn

string

HBA WWN address.

iscsi_name

string

iSCSI name.

host_groups

list / elements=dictionary

List of host group configurations.

host_group_id

integer

Host group identifier.

host_group_name

string

Host group name.

port_id

string

Port identifier.

is_reserved

boolean

Indicates if the server is reserved.

Choices:

  • false

  • true

iscsi_target_settings

list / elements=dictionary

List of iSCSI target configurations.

port_id

string / required

Port identifier.

target_iscsi_name

string / required

iSCSI target name.

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.

Choices:

  • false

  • true

nick_name

string

Server nickname specification.

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

List of path configurations.

hba_wwn

string

HBA WWN address.

iscsi_name

string

iSCSI name.

port_ids

list / elements=string / required

List of port identifiers.

port_ids

list / elements=string

List of port identifiers.

protocol

string

Server protocol type.

Choices:

  • "FC"

  • "iSCSI"

server_id

integer

Server identifier.

state

string

Defines the server operation type. Available options include present, absent, sync_server_nick_name, add_host_groups, add_hba, remove_hba, add_path, and remove_path.

Choices:

  • "present" ← (default)

  • "absent"

  • "sync_server_nick_name"

  • "add_host_groups"

  • "add_hba"

  • "remove_hba"

  • "add_path"

  • "remove_path"

  • "change_iscsi_target_settings"

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

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

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)