netapp.storagegrid.na_sg_grid_cluster_config module – NetApp StorageGRID cluster configuration via install API.

Note

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

New in netapp.storagegrid 21.17.0

Synopsis

  • Configure a NetApp StorageGRID cluster via the pre-authentication install API.

  • Covers grid details (name and license), DNS servers, NTP servers, grid networks, site creation, provisioning passwords, node approval, and provisioning start.

  • Each configuration area is applied only when its corresponding parameter is provided, making all parameters optional and the module fully idempotent.

Parameters

Parameter

Comments

api_url

string / required

The url to the StorageGRID Node PGE REST API.

approve_nodes

boolean

Auto-approve all pending (unconfigured) nodes discovered by the install API.

Nodes already marked as configured are skipped.

A site must exist (or site_name must be provided) before approving nodes.

Choices:

  • false ← (default)

  • true

dns_servers

list / elements=string

List of DNS server IP addresses for the grid.

grid_name

string

Name to assign to the StorageGRID grid.

grid_networks

list / elements=string

List of grid network CIDR ranges.

license

string

StorageGRID license key (base64-encoded JSON string).

management_passphrase

string

Management (root) password for the grid admin interface.

ntp_servers

list / elements=string

List of NTP server addresses for the grid.

provision_passphrase

string

Provisioning passphrase for the grid.

recovery_package_path

string

Local filesystem path where the Recovery Package ZIP file will be saved.

integer

Integer cookie value passed as the setCookie query parameter when downloading the Recovery Package. - When provided, a cookie named recovery-package-download-started-{value} is set on a successful download response.

recovery_package_wait_timeout

integer

Seconds to wait for the Recovery Package to become available after provisioning starts.

Default: 1800

site_name

string

Name of the primary site to create. Skipped if a site with this name already exists.

start_provisioning

boolean

Trigger the grid provisioning process after all other configuration steps.

Choices:

  • false ← (default)

  • true

state

string

Desired state of the cluster configuration.

Choices:

  • "present" ← (default)

use_random_passwords

boolean

Use randomly generated passwords instead of the supplied ones.

Choices:

  • false ← (default)

  • true

validate_certs

boolean

Should https certificates be validated?

Choices:

  • false

  • true ← (default)

Notes

Note

  • The modules prefixed with na_sg_pge are built to manage NetApp StorageGRID node Pre-Grid Environment (PGE) configuration.

Examples

- name: Configure StorageGRID cluster
  netapp.storagegrid.na_sg_grid_cluster_config:
    api_url: "<storage_endpoint>"
    validate_certs: false
    state: present
    grid_name: "my-grid"
    license: "<base64-encoded-license>"
    dns_servers:
      - "10.224.223.130"
    ntp_servers:
      - "10.235.48.111"
    grid_networks:
      - "172.16.160.0/19"
    site_name: "gdl"
    provision_passphrase: "{{ provision_pass }}"
    management_passphrase: "{{ mgmt_pass }}"
    approve_nodes: true
    start_provisioning: true

- name: Update DNS and NTP servers only
  netapp.storagegrid.na_sg_grid_cluster_config:
    api_url: "<storage_endpoint>"
    validate_certs: false
    dns_servers:
      - "8.8.8.8"
      - "8.8.4.4"
    ntp_servers:
      - "pool.ntp.org"

Return Values

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

Key

Description

resp

dictionary

Results of each configuration step that was applied.

Returned: success

Sample: {"dns_servers": ["10.224.223.130"], "grid_details": {"name": "my-grid"}, "grid_networks": ["172.16.160.0/19"], "nodes_approved": 3, "ntp_servers": ["10.235.48.111"], "passwords_set": true, "provisioning_started": true, "recovery_package_confirm": {"status": "success"}, "recovery_package_msg": "Visit the recovery package URL", "recovery_package_path": "/tmp/storagegrid-recovery.zip", "recovery_package_url": "https://10.224.176.67/api/v4/install/recovery-package", "site": {"id": "abc123", "name": "gdl"}}

Authors

  • NetApp Ansible Team (@jayaramp)