netapp.storagegrid.na_sg_grid_ha_group module – Manage high availability (HA) group configuration on StorageGRID.

Note

This module is part of the netapp.storagegrid collection (version 21.16.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 netapp.storagegrid.

To use it in a playbook, specify: netapp.storagegrid.na_sg_grid_ha_group.

New in netapp.storagegrid 21.10.0

Synopsis

  • Create, Update, Delete HA Groups on NetApp StorageGRID.

Parameters

Parameter

Comments

api_url

string / required

The url to the StorageGRID Admin Node REST API.

auth_token

string / required

The authorization token for the API request

description

string

Description of the HA Group.

gateway_cidr

string

The gateway_cidr field specifies the gateway IP address and prefix length of the VIP subnet in CIDR notation. i.e. IP_address/prefix_length.

This must match the subnet CIDR if any interface in the HA group already has an IP address configured.

The IP address may be specified as the network address of the subnet, or as the gateway IP address within the subnet if clients will access the VIP address from a different subnet.

For example 10.193.150.0/25 or 10.193.150.1/25.

ha_group_id

string

HA Group ID.

May be used for modify or delete operation.

interfaces

list / elements=dictionary

A set of StorageGRID node interface pairs.

The primary interface is specified first, followed by the other interface pairs in failover order.

interface

string

The interface to bind to. eth0 corresponds to the Grid Network, eth1 to the Admin Network, and eth2 to the Client Network.

node

string

Name of the StorageGRID node.

name

string

Name of the HA Group.

state

string

Whether the specified HA Group should exist.

Choices:

  • "present" ← (default)

  • "absent"

validate_certs

boolean

Should https certificates be validated?

Choices:

  • false

  • true ← (default)

virtual_ips

list / elements=string

A list of virtual IP addresses.

Notes

Note

  • The modules prefixed with na_sg are built to manage NetApp StorageGRID.

Examples

- name: create HA Group (layer 2)
  netapp.storagegrid.na_sg_grid_ha_group:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: present
    name: Site1-HA-Group
    description: "Site 1 HA Group"
    gateway_cidr: 192.168.50.0/24
    virtual_ips: 192.168.50.5
    interfaces:
      - node: SITE1-ADM1
        interface: eth2
      - node: SITE1-G1
        interface: eth2

- name: create HA Group (routable)
  netapp.storagegrid.na_sg_grid_ha_group:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: present
    name: Site1-HA-Group
    description: "Site 1 HA Group"
    gateway_cidr: 192.168.50.1/24
    virtual_ips: 192.168.50.5
    interfaces:
      - node: SITE1-ADM1
        interface: eth2
      - node: SITE1-G1
        interface: eth2

- name: add VIP to HA Group
  netapp.storagegrid.na_sg_grid_ha_group:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: present
    name: Site1-HA-Group
    description: "Site 1 HA Group"
    gateway_cidr: 192.168.50.1/24
    virtual_ips: 192.168.50.5,192.168.50.6
    interfaces:
      - node: SITE1-ADM1
        interface: eth2
      - node: SITE1-G1
        interface: eth2

- name: rename HA Group
  netapp.storagegrid.na_sg_grid_ha_group:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: present
    ha_group_id: 00000000-0000-0000-0000-000000000000
    name: Site1-HA-Group-New-Name
    description: "Site 1 HA Group"
    gateway_cidr: 192.168.50.1/24
    virtual_ips: 192.168.50.5
    interfaces:
      - node: SITE1-ADM1
        interface: eth2
      - node: SITE1-G1
        interface: eth2

- name: delete HA Group
  netapp.storagegrid.na_sg_grid_ha_group:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: absent
    name: Site1-HA-Group

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

resp

dictionary

Returns information about the StorageGRID HA Group.

Returned: success

Sample: {"description": "Site 1 HA Group", "gatewayCidr": "192.168.50.1/24", "id": "bb386f30-805d-4fec-a2c5-85790b460db0", "interfaces": [{"interface": "eth2", "nodeId": "0b1866ed-d6e7-41b4-815f-bf867348b76b"}, {"interface": "eth2", "nodeId": "7bb5bf05-a04c-4344-8abd-08c5c4048666"}], "name": "Site1-HA-Group", "virtualIps": ["192.168.50.5", "192.168.50.6"]}

Authors

  • NetApp Ansible Team (@joshedmonds)