Join AnsibleFest at Red Hat Summit!

netapp.storagegrid.na_sg_grid_ilm_policy module – Manage ILM policies on StorageGRID.

Note

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

New in netapp.storagegrid 21.14.0

Synopsis

  • Interact with ILM policies on NetApp StorageGRID.

Parameters

Parameter

Comments

api_url

string / required

Rest endpoint for all invocations against the grid

auth_token

string / required

The authorization token for the API request

default_rule

string

The rule ID of the defailt rule in the policy.

This tile ID must be included in rules

If compliance is enabled, this must be the compliance-compatible rule

name

string / required

The unique name of the policy

reason

string

Policy description

rules

list / elements=string

A list of ILM rule IDs, in the order in which they will be evaluated

This list must include the default rule

If compliance is enabled, the default rule for objects in non-compliant buckets should be before the compliance-compatible default rule

state

string

Whether the specified policy should exist.

Choices:

  • "present" ← (default)

  • "absent"

validate_certs

boolean

Should https certificates be validated?

Choices:

  • false

  • true ← (default)

Notes

Note

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

Examples

- name: Create ILM policy
  na_sg_grid_ilm_policy:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    name: "1 Copy Per Site"
    state: present
    reason: "The 1 Copy Per Site policy placves 1 replicated copy at each site"
    default_rule: r601033236249396421
    rules:
      - r601033236249396421

- name: Delete existing ILM policy
  na_sg_grid_ilm_policy:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    name: "1 Copy Per Site"
    state: absent

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 ILM policy.

Returned: If state is ‘present’.

Sample: {"activatedBy": [], "active": false, "defaultRule": "r601033236249396421", "id": "f9cecfd8-fe93-4529-b883-d1707e753009", "name": "1 Copy Per Site", "reason": "The 1 Copy Per Site policy placves 1 replicated copy at each site", "rules": ["r601033236249396421"]}

Authors

  • Denis Magel (@dmagel-netapp)