netapp.storagegrid.na_sg_grid_alert_receiver module – NetApp StorageGRID manage alert receiver.
Note
This module is part of the netapp.storagegrid collection (version 21.15.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_alert_receiver
.
New in netapp.storagegrid 21.15.0
Synopsis
Create, update, or delete alert receivers on NetApp StorageGRID.
Parameters
Parameter |
Comments |
---|---|
The url to the StorageGRID Admin Node REST API. |
|
The authorization token for the API request |
|
CA certificate used to verify the identity of the SMTP server. |
|
Client certificate for the SMTP server. |
|
The PEM-encoded private key for the client certificate. |
|
Whether alert notifications are sent to this receiver. Choices:
|
|
Sender email address. |
|
Minimum severity level for triggering an alert. Choices:
|
|
Password for the SMTP server. |
|
The IP address or hostname of the SMTP server. |
|
The port to use to communicate with the SMTP server. |
|
Whether the alert receiver should be present or absent. Choices:
|
|
List of recipient email addresses. |
|
The type of notification receiver. Choices:
|
|
Username for the SMTP server. |
|
Should https certificates be validated? Choices:
|
Notes
Note
The modules prefixed with
na_sg
are built to manage NetApp StorageGRID.
Examples
- name: Create alert receiver
netapp.storagegrid.na_sg_alert_receiver:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
type: email
enable: true
smtp_host: "smtp.example.com"
smtp_port: 25
username: "smtp-user"
password: "smtp-password"
from_email: "[email protected]"
to_emails:
- "[email protected]"
minimum_severity: "minor"
ca_cert: "-----BEGIN CERTIFICATE-----*******-----END CERTIFICATE-----"
client_cert: "-----BEGIN CERTIFICATE-----*******-----END CERTIFICATE-----"
client_key: "-----BEGIN PRIVATE KEY-----*******-----END PRIVATE KEY-----"
- name: Delete alert receiver
netapp.storagegrid.na_sg_alert_receiver:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
type: email
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Returns the response from the StorageGRID API for alert receiver. Returned: success Sample: |