purestorage.flashblade.purefb_snap (1.17.0) — module

Manage filesystem snapshots on Pure Storage FlashBlades

| "added in version" 1.0.0 of purestorage.flashblade"

Authors: Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>

preview | supported by community

Install collection

Install with ansible-galaxy collection install purestorage.flashblade:==1.17.0


Add to requirements.yml

  collections:
    - name: purestorage.flashblade
      version: 1.17.0

Description

Create or delete volumes and filesystem snapshots on Pure Storage FlashBlades.

Restoring a filesystem from a snapshot is only supported using the latest snapshot.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create snapshot foo.ansible
  purestorage.flashblade.purefb_snap:
    name: foo
    suffix: ansible
    fb_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create immeadiate snapshot foo.ansible to connected FB bar
  purestorage.flashblade.purefb_snap:
    name: foo
    suffix: ansible
    now: true
    targets:
    - bar
    fb_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete snapshot named foo.snap
  purestorage.flashblade.purefb_snap:
    name: foo
    suffix: snap
    fb_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Recover deleted snapshot foo.ansible
  purestorage.flashblade.purefb_snap:
    name: foo
    suffix: ansible
    fb_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Restore filesystem foo (uses latest snapshot)
  purestorage.flashblade.purefb_snap:
    name: foo
    fb_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: restore
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Eradicate snapshot named foo.snap
  purestorage.flashblade.purefb_snap:
    name: foo
    suffix: snap
    eradicate: true
    fb_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
    state: absent

Inputs

    
now:
    default: false
    description:
    - Whether to initiate a snapshot replication immeadiately
    type: bool
    version_added: 1.7.0
    version_added_collection: purestorage.flashblade

name:
    description:
    - The name of the source filesystem.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    - restore
    default: present
    description:
    - Define whether the filesystem snapshot should exist or not.
    type: str

fb_url:
    description:
    - FlashBlade management IP address or Hostname.
    type: str

suffix:
    description:
    - Suffix of snapshot name.
    type: str

targets:
    description:
    - Name of target to replicate snapshot to.
    - This is only applicable when I(now) is B(true)
    elements: str
    type: list
    version_added: 1.7.0
    version_added_collection: purestorage.flashblade

api_token:
    description:
    - FlashBlade API token for admin privileged user.
    type: str

eradicate:
    default: false
    description:
    - Define whether to eradicate the snapshot on delete or leave in trash.
    type: bool