purestorage.flasharray.purefa_pgsnap – Manage protection group snapshots on Pure Storage FlashArrays¶
Note
This plugin is part of the purestorage.flasharray collection (version 1.7.0).
To install it use: ansible-galaxy collection install purestorage.flasharray
.
To use it in a playbook, specify: purestorage.flasharray.purefa_pgsnap
.
New in version 1.0.0: of purestorage.flasharray
Synopsis¶
Create or delete protection group snapshots on Pure Storage FlashArray.
Recovery of replicated snapshots on the replica target array is enabled.
Support for ActiveCluster and Volume Group protection groups is supported.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
purestorage >= 1.19
py-pure-client >= 1.6.0
netaddr
requests
Parameters¶
Notes¶
Note
This module requires the
purestorage
Python libraryYou must set
PUREFA_URL
andPUREFA_API
environment variables if fa_url and api_token arguments are not passed to the module directly
Examples¶
- name: Create protection group snapshot foo.ansible
purefa_pgsnap:
name: foo
suffix: ansible
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Delete and eradicate protection group snapshot named foo.snap
purefa_pgsnap:
name: foo
suffix: snap
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Restore volume data from local protection group snapshot named foo.snap to volume data2
purefa_pgsnap:
name: foo
suffix: snap
restore: data
target: data2
overwrite: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Restore remote protection group snapshot arrayA:pgname.snap.data to local copy
purefa_pgsnap:
name: arrayA:pgname
suffix: snap
restore: data
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Restore AC pod protection group snapshot pod1::pgname.snap.data to pdo1::data2
purefa_pgsnap:
name: pod1::pgname
suffix: snap
restore: data
target: pod1::data2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Create snapshot of existing pgroup foo with suffix and force immeadiate copy to remote targets
purefa_pgsnap:
name: pgname
suffix: force
now: True
apply_retention: True
remote: True
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete and eradicate snapshot named foo.snap on offload target bar from arrayA
purefa_pgsnap:
name: "arrayA:foo"
suffix: snap
offload: bar
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
Authors¶
Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>