purestorage.flashblade.purefb_bucket module – Manage Object Store Buckets on a Pure Storage FlashBlade.

Note

This module is part of the purestorage.flashblade collection (version 1.11.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install purestorage.flashblade. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: purestorage.flashblade.purefb_bucket.

New in purestorage.flashblade 1.0.0

Synopsis

  • This module managess object store (s3) buckets on Pure Storage FlashBlade.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 2.7

  • purity_fb >= 1.9

  • netaddr

  • pytz

Parameters

Parameter

Comments

account

string / required

Object Store Account for Bucket.

api_token

string

FlashBlade API token for admin privileged user.

eradicate

boolean

Define whether to eradicate the bucket on delete or leave in trash.

Choices:

  • false ← (default)

  • true

fb_url

string

FlashBlade management IP address or Hostname.

mode

string

added in purestorage.flashblade 1.10.0

The type of bucket to be created. Also referred to a VSO Mode.

Requires Purity//FB 3.3.3 or higher

multi-site type can only be used after feature is enabled by Pure Technical Support

Choices:

  • "classic"

  • "multi-site"

name

string / required

Bucket Name.

state

string

Create, delete or modifies a bucket.

Choices:

  • "present" ← (default)

  • "absent"

versioning

string

State of S3 bucket versioning

Choices:

  • "enabled"

  • "suspended"

  • "absent" ← (default)

Notes

Note

  • This module requires the purity_fb Python library

  • You must set PUREFB_URL and PUREFB_API environment variables if fb_url and api_token arguments are not passed to the module directly

Examples

- name: Create new bucket named foo in account bar
  purestorage.flashblade.purefb_bucket:
    name: foo
    account: bar
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Delete bucket named foo in account bar
  purestorage.flashblade.purefb_bucket:
    name: foo
    account: bar
    state: absent
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Change bucket versioning state
  purestorage.flashblade.purefb_bucket:
    name: foo
    account: bar
    versioning: enabled
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Recover deleted bucket named foo in account bar
  purestorage.flashblade.purefb_bucket:
    name: foo
    account: bar
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Eradicate bucket named foo in account bar
  purestorage.flashblade.purefb_bucket:
    name: foo
    account: bar
    state: absent
    eradicate: true
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

Authors

  • Pure Storage Ansible Team (@sdodsley)