NetApp has been dedicated to automation with Ansible, and StorageGRID is a great example. The great work that has been done for ONTAP is also being leveraged for my favorite object storage platform.
That’s right, you can now authenticate within the module just like the ONTAP modules allow. This allows for more concise playbooks, as well as an easier process for using the StorageGRID modules. Usernames and Passwords can be kept in vaults and passed in via variables. This is especially useful and secure in both AWX and Ansible Automation Platform use cases. Using the username/password combination will also make the token available as a returned element from the output so it can be registered and used by subsequent modules if you don’t want to pass the username and password with each task.
Additionally, to make the modules more aligned with their end use cases two ‘new’ modules are being added. These are actually just duplicates of other modules but renamed to reflect their use cases.
The modules na_sa_grid_account and na_sa_org_container now also exist as na_sa_grid_tenant and na_sa_org_bucket. The reason for this duplication is to make the user experience with the modules better. The core API of StorageGRID refers to tenants as accounts and buckets as containers, but that isn’t how any users refer to them. So now when you want to create a tenant you use for the tenant module, and when you want to create a bucket, you use the bucket module.
Improving the User Experience for StorageGRID’s Ansible Collection
NetApp has been dedicated to automation with Ansible, and StorageGRID is no exception. The great work that has been done for ONTAP is also being leveraged for my favorite object storage platform.
As good as the modules where, there are a few things that made using the StorageGRID Ansible modules less fluid, but with the release of Collection version 21.15.0, these have now been smoothed over.
First, I want to emphasize that none of the changes introduced with this release will break any of the automation work you may have already done. All your playbooks and roles will continue to function as they always have. However, going forward, there are more options available.
Streamlined Authentication
The first and most significant change is a more streamlined authentication option.
Until now, authentication for the StorageGRID modules required the use of Ansible’s core uri module to acquire a token from the GRID, which was then used to authenticate any and all StorageGRID modules run within a playbook. That method still works, but now all modules have two new variable options:
username:
password:
That’s right—you can now authenticate within the module, just like the ONTAP modules allow. This results in smaller, simpler playbooks and an easier overall process for using the StorageGRID modules. Usernames and passwords can be securely stored in vaults and passed in via variables, which is especially useful and secure in AWX and Ansible Automation Platform use cases.
Using the username/password combination will also make the token available as a returned element from the module’s output. This allows it to be registered and used by subsequent modules, if you prefer not to pass the username and password with each task.
Module Naming Improvements
Additionally, to better align the modules with their real-world use cases, two ‘new’ modules are being added. These are duplicates of existing modules but have been renamed to reflect how they are commonly referred to in practice.
- na_sa_grid_account now also exists as na_sa_grid_tenant
- na_sa_org_container now also exists as na_sa_org_bucket
The reason for this duplication is to improve your experience. The core API of StorageGRID refers to tenants as accounts and buckets as containers, but that’s not how users actually refers to them. Now, when you want to create a tenant, you can use the tenant module, and when you want to create a bucket, you can use the bucket module.
________________________________________________________________________________
We have many more improvements and features planned for future collection releases, so stay tuned for more goodness! In the meantime, you can find more information about the StorageGRID Ansible collection here Netapp.Storagegrid — Ansible Community Documentation: Netapp.Storagegrid — Ansible Community Documentation, and more about StorageGRID in general here: StorageGRID — Object Storage | NetApp. StorageGRID — Object Storage | NetApp.