This collection includes a variety of validated Ansible Roles to automate and manage Day-2 use cases involving NetApp Trident Protect in a Red Hat OpenShift Virtualization environment. It covers common application data management workflows such as Backup and Restore, Snapshot scheduling and Restore, and Disaster Recovery (SnapMirror Replication, Failover, Failback, and Reverse Resync).
This collection uses the kubernetes.core certified Ansible collection to manage Kubernetes objects such as Applications, AppVaults, Backups, Snapshots, SnapshotSchedules, and Replication resources via the NetApp Trident Protect custom resources.
This collection has been tested with ansible-core >= 2.16.0.
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
ansible-galaxy collection install netapp.trident_protectYou can also include it in a requirements.yml file and install it with
ansible-galaxy collection install -r requirements.yml, using the format:
---
collections:
- name: netapp.trident_protectNote that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the ansible package. To upgrade the collection to the latest available version, run the following command:
ansible-galaxy collection install netapp.trident_protect --upgradeYou can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install a specific version, for example 1.0.0:
ansible-galaxy collection install netapp.trident_protect:==1.0.0See using Ansible collections for more details.
Update vars/trident_protect_main.yml with your desired configuration before running the playbook.
To execute common Trident Protect tasks (shared by both Backup/Restore and Snapshot/Restore scenarios):
ansible-playbook Setup_Trident_Protect_tasks.yml -e @vars/trident_protect_main.yml -t tp_common_tasksTo execute the Backup and Restore scenario:
ansible-playbook Setup_Trident_Protect_tasks.yml -e @vars/trident_protect_main.yml -t tp_backup_and_restore_tasksTo create Snapshot schedules for VMs in OpenShift Virtualization:
ansible-playbook Setup_Trident_Protect_tasks.yml -e @vars/trident_protect_main.yml -t tp_snapshot_schedule_tasksTo execute the Snapshot and Restore scenario (ensure the snapshot schedule has produced at least one snapshot first):
ansible-playbook Setup_Trident_Protect_tasks.yml -e @vars/trident_protect_main.yml -t tp_snapshot_and_restore_tasksAdditional Disaster Recovery tags available in Setup_Trident_Protect_tasks.yml include roles for DR prerequisites, AMR configuration, failover, failback (prepare/establish/promote), and reverse resync. Refer to the roles under roles/trident_protect/ for the full list.
See the changelog.