netapp.storagegrid.na_sg_org_container module – Manage buckets on StorageGRID.
Note
This module is part of the netapp.storagegrid collection (version 21.10.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_org_container
.
New in version 20.6.0: of netapp.storagegrid
Parameters
Parameter |
Comments |
---|---|
The url to the StorageGRID Admin Node REST API. |
|
The authorization token for the API request |
|
Configure compliance settings for an S3 bucket. Cannot be specified along with s3_object_lock_enabled. |
|
If enabled, objects will be deleted automatically when its retention period expires, unless the bucket is under a legal hold. Choices:
|
|
If enabled, objects in this bucket cannot be deleted, even if their retention period has expired. Choices:
|
|
specify the length of the retention period for objects added to this bucket, in minutes. |
|
Name of the bucket. |
|
Set a region for the bucket. |
|
Enable S3 Object Lock on the bucket. S3 Object Lock requires StorageGRID 11.5 or greater Choices:
|
|
Whether the specified bucket should exist or not. Choices:
|
|
Should https certificates be validated? Choices:
|
Examples
- name: create a s3 bucket
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
name: ansiblebucket1
- name: delete a s3 bucket
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: absent
name: ansiblebucket1
- name: create a s3 bucket with Object Lock
netapp.storagegrid.na_sg_org_container:
api_url: "https://<storagegrid-endpoint-url>"
auth_token: "storagegrid-auth-token"
validate_certs: false
state: present
name: objectlock-bucket1
s3_object_lock_enaled: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Returns information about the StorageGRID bucket. Returned: always Sample: {“compliance”: {“autoDelete”: false, “legalHold”: false, “retentionPeriodMinutes”: 2629800}, “creationTime”: “2021-01-01T00:00:00.000Z”, “name”: “example-bucket”, “region”: “us-east-1”, “s3ObjectLock”: {“enabled”: false}} |
Authors
NetApp Ansible Team (@joshedmonds)