purestorage.flashblade.purefb_lifecycle (1.17.0) — module

Manage FlashBlade object lifecycles

| "added in version" 1.4.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

Manage lifecycles for object buckets


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a lifecycle rule called bar for bucket foo (pre-Purity//FB 3.2.3)
  purestorage.flashblade.purefb_lifecycle:
    name: bar
    bucket: foo
    keep_previous_for: 2d
    prefix: test
    fb_url: 10.10.10.2
    api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a lifecycle rule called bar for bucket foo (post-Purity//FB 3.2.3)
  purestorage.flashblade.purefb_lifecycle:
    name: bar
    bucket: foo
    keep_previous_for: 2d
    keep_current_for: 1w
    abort_uploads_after: 1d
    keep_current_until: 2020-11-23
    prefix: test
    fb_url: 10.10.10.2
    api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify a lifecycle rule (post-Purity//FB 3.2.3)
  purestorage.flashblade.purefb_lifecycle:
    name: bar
    bucket: foo
    keep_previous_for: 10d
    fb_url: 10.10.10.2
    api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete lifecycle rule foo from bucket foo
  purestorage.flashblade.purefb_lifecycle:
    name: foo
    bucket: bar
    state: absent
    fb_url: 10.10.10.2
    api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6

Inputs

    
name:
    description:
    - Name of the lifecycle rule
    required: true
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Create or delete lifecycle rule
    type: str

bucket:
    description:
    - Bucket the lifecycle rule applies to
    required: true
    type: str

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

prefix:
    description:
    - Object key prefix identifying one or more objects in the bucket
    type: str

enabled:
    default: true
    description:
    - State of lifecycle rule
    type: bool

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

keep_current_for:
    description:
    - Time after which current versions will be marked expired.
    - Enter as days (d) or weeks (w). Range is 1 - 2147483647 days.
    type: str
    version_added: 1.8.0
    version_added_collection: purestorage.flashblade

keep_previous_for:
    aliases:
    - keep_for
    description:
    - Time after which previous versions will be marked expired.
    - Enter as days (d) or weeks (w). Range is 1 - 2147483647 days.
    type: str

keep_current_until:
    description:
    - Date after which current versions will be marked expired.
    - Enter as date in form YYYY-MM-DD.
    - B(Note:) setting a date in the past will delete ALL objects with the value of I(prefix)
      as they are created.
    type: str
    version_added: 1.8.0
    version_added_collection: purestorage.flashblade

abort_uploads_after:
    description:
    - Duration of time after which incomplete multipart uploads will be aborted.
    - Enter as days (d) or weeks (w). Range is 1 - 2147483647 days.
    type: str
    version_added: 1.8.0
    version_added_collection: purestorage.flashblade