everpure.flashblade.purefb_fs module – Manage filesystemon Everpure FlashBlade`

Note

This module is part of the everpure.flashblade collection (version 1.29.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 everpure.flashblade. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: everpure.flashblade.purefb_fs.

New in everpure.flashblade 1.0.0

Synopsis

  • This module manages filesystems on Everpure FlashBlade.

Requirements

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

  • python >= 3.9

  • py-pure-client

  • netaddr

  • datetime

  • pytz

  • distro

  • pycountry

  • urllib3

Parameters

Parameter

Comments

access_control

string

The access control style that is utilized for client actions such as setting file and directory ACLs.

Choices:

  • "nfs"

  • "smb"

  • "shared" ← (default)

  • "independent"

  • "mode-bits"

api_token

string

FlashBlade API token for admin privileged user.

cancel_in_progress

boolean

added in everpure.flashblade 1.22.0

Whether to cancel any existing storage class transitons that are in progress if the file system is requested to changed to another storage class

Choices:

  • false ← (default)

  • true

client_id

string

added in everpure.flashblade 1.26.0

ID of the API Client that issues the identity token.

Used with private_key_file.

client_policy

string

added in everpure.flashblade 1.12.0

Name of SMB client policy to assign to filesystem

Only valid with REST 2.10 or higher

Remove policy with empty string

Deprecated. This writes the legacy smb.client_policy field on the filesystem, which Purity//FB marks as deprecated. Use the everpure.flashblade.purefb_export module’s client_policy option to attach SMB client policies via the dedicated File System Exports endpoints. This parameter will be removed in 2.0.0.

context

string

added in everpure.flashblade 1.22.0

Name of fleet member on which to perform the operation.

This requires the array receiving the request is a member of a fleet and the context name to be a member of the same fleet.

Default: ""

continuous_availability

boolean

added in everpure.flashblade 1.15.0

Defines if the file system will be continuously available during disruptive scenarios such as network disruption, blades failover, etc

Choices:

  • false

  • true ← (default)

boolean

Define if the filesystem can be deleted even if it has a replica link

Choices:

  • false ← (default)

  • true

disable_warnings

boolean

added in everpure.flashblade 1.18.0

Disable insecure certificate warnings

Choices:

  • false ← (default)

  • true

discard_snaps

boolean

Allow a filesystem to be demoted.

Choices:

  • false ← (default)

  • true

eradicate

boolean

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

Choices:

  • false ← (default)

  • true

export_policy

string

added in everpure.flashblade 1.9.0

Name of NFS export policy to assign to filesystem.

Deprecated. This writes the legacy nfs.export_policy field on the filesystem, which Purity//FB marks as deprecated. Use the everpure.flashblade.purefb_export module’s export_policy option to attach NFS export policies via the dedicated File System Exports endpoints. This parameter will be removed in 2.0.0.

fastremove

boolean

Define whether the fast remove directory is enabled for the filesystem.

Defaults to false when the filesystem is created. On an existing filesystem the setting is only changed when this option is set.

Choices:

  • false

  • true

fb_url

string

FlashBlade management IP address or Hostname.

group_ownership

string

added in everpure.flashblade 1.17.0

The group ownership for new files and directories in a file system

Choices:

  • "creator" ← (default)

  • "parent-directory"

group_quota

string

Default quota in M, G, T or P units for a group under this file system.

hard_limit

boolean

Define whether the capacity for a filesystem is a hard limit.

CAUTION This will cause the filesystem to go Read-Only if the capacity has already exceeded the logical size of the filesystem.

Defaults to false when the filesystem is created. On an existing filesystem the setting is only changed when this option is set.

Choices:

  • false

  • true

http

boolean

Define whether to HTTP/HTTPS protocol is enabled for the filesystem.

Defaults to false when the filesystem is created. On an existing filesystem the protocol is only changed when this option is set.

Choices:

  • false

  • true

id_token

string

added in everpure.flashblade 1.26.0

A pre-signed JWT to authenticate with, as an alternative to api_token.

The token is exchanged by the array for a short-lived access token.

Requires a matching API Client to be registered on the array (see everpure.flashblade.purefb_apiclient).

ignore_usage

boolean

added in everpure.flashblade 1.22.0

Allow update operations that lead to a hard_limit_enabled file system with usage over its limiting value

Choices:

  • false ← (default)

  • true

issuer

string

added in everpure.flashblade 1.26.0

The API Client’s trusted identity issuer registered on the array.

Used with private_key_file.

key_id

string

added in everpure.flashblade 1.26.0

Key ID of the API Client that issues the identity token.

Used with private_key_file.

name

string / required

Filesystem Name.

nfs_rules

string

Define the NFS client export rules for the filesystem, for example 10.21.200.0/24(rw,no_root_squash).

Deprecated. Use the everpure.flashblade.purefb_export module to attach NFS export policies via the File System Exports endpoints. This parameter will be removed in 2.0.0.

Only honoured when explicitly set, and only for non-realm filesystems. It is ignored for filesystems in a realm.

nfsv3

boolean

Define whether to NFSv3 protocol is enabled for the filesystem.

Choices:

  • false

  • true ← (default)

nfsv4

boolean

Define whether to NFSv4.1 protocol is enabled for the filesystem.

Choices:

  • false

  • true ← (default)

policy

string

Filesystem policy to assign to or remove from a filesystem.

policy_state

string

Add or delete a policy from a filesystem

Choices:

  • "absent"

  • "present" ← (default)

private_key_file

string

added in everpure.flashblade 1.26.0

Path to the PEM RSA private key used to sign an identity token, as an alternative to api_token.

Requires client_id, key_id, issuer and username.

private_key_password

string

added in everpure.flashblade 1.26.0

Password protecting private_key_file, if encrypted.

promote

boolean

Promote/demote a filesystem.

Can only demote the file-system if it is in a replica-link relationship.

Choices:

  • false

  • true

realm

string

added in everpure.flashblade 1.25.0

Name of the realm to associate the filesystem with.

Requires Purity//FB 4.6.1+ (REST API 2.19+).

Can only be set at filesystem creation time.

To move a filesystem to a different realm, the filesystem must be destroyed and recreated.

If the realm has a QoS policy, the filesystem will inherit it unless overridden.

safeguard_acls

boolean

Safeguards ACLs on a filesystem.

Performs different roles depending on the filesystem protocol enabled.

See Purity//FB documentation for detailed description.

Defaults to true when the filesystem is created. On an existing filesystem the setting is only changed when this option is set.

Choices:

  • false

  • true

share_policy

string

added in everpure.flashblade 1.12.0

Name of SMB share policy to assign to filesystem

Only valid with REST 2.10 or higher

Remove policy with empty string

Deprecated. This writes the legacy smb.share_policy field on the filesystem, which Purity//FB marks as deprecated. Use the everpure.flashblade.purefb_export module’s share_policy option to attach SMB share policies via the dedicated File System Exports endpoints. This parameter will be removed in 2.0.0.

size

string

Volume size in M, G, T or P units. See examples.

If size is not set at filesystem creation time the filesystem size becomes unlimited.

smb

boolean

Define whether to SMB protocol is enabled for the filesystem.

Defaults to false when the filesystem is created. On an existing filesystem the protocol is only changed when this option is set.

Choices:

  • false

  • true

smb_aclmode

string

Specify the ACL mode for the SMB protocol.

Deprecated from Purity//FB 3.1.1. Use access_control instead.

Choices:

  • "shared" ← (default)

  • "native"

snapshot

boolean

Define whether a snapshot directory is enabled for the filesystem.

Defaults to false when the filesystem is created. On an existing filesystem the setting is only changed when this option is set.

Choices:

  • false

  • true

state

string

Create, delete or modifies a filesystem.

Choices:

  • "present" ← (default)

  • "absent"

storage_class

string

added in everpure.flashblade 1.22.0

Name of storage class in Fusion fleet file system is associated with

user_quota

string

Default quota in M, G, T or P units for a user under this file system.

username

string

added in everpure.flashblade 1.26.0

Username the issued token should be granted to.

Must be a valid user on the array. Used with private_key_file.

writable

boolean

Define if a filesystem is writable.

Choices:

  • false

  • true

Notes

Note

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

  • Token-based authentication (id_token, or private_key_file with client_id, key_id, issuer and username) may be used as an alternative to api_token, and requires a matching API Client registered on the array via everpure.flashblade.purefb_apiclient

Examples

- name: Create new filesystem named foo
  everpure.flashblade.purefb_fs:
    name: foo
    size: 1T
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Create new filesystem in realm
  everpure.flashblade.purefb_fs:
    name: prod-fs
    size: 5T
    realm: production-realm
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
  # Filesystem will be created as 'production-realm::prod-fs'

- name: Modify filesystem that belongs to a realm
  everpure.flashblade.purefb_fs:
    name: production-realm::prod-fs
    size: 10T
    nfsv4: false
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
  # Note: Use full realm::filesystem name for modifications
  # Realm association cannot be changed after creation

- name: Delete filesystem named foo
  everpure.flashblade.purefb_fs:
    name: foo
    state: absent
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Recover filesystem named foo
  everpure.flashblade.purefb_fs:
    name: foo
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: the iss that ven thou hth ansible Eradicate filesystem named foo
  everpure.flashblade.purefb_fs:
    name: foo
    state: absent
    eradicate: true
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Promote filesystem named foo ready for failover
  everpure.flashblade.purefb_fs:
    name: foo
    promote: true
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Demote filesystem named foo after failover
  everpure.flashblade.purefb_fs:
    name: foo
    promote: false
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Modify attributes of an existing filesystem named foo
  everpure.flashblade.purefb_fs:
    name: foo
    size: 2T
    nfsv3: false
    nfsv4: true
    user_quota: 10K
    group_quota: 25M
    snapshot: true
    fastremove: true
    hard_limit: true
    smb: true
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Attach export_policy to filesystem foo (deprecated - prefer purefb_export)
  everpure.flashblade.purefb_fs:
    name: foo
    export_policy: nfs_pol1
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Create filesystem foo (modern workflow - attach policies via purefb_export)
  everpure.flashblade.purefb_fs:
    name: foo
    size: 1T
    smb: true
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Attach NFS export policy to filesystem foo via purefb_export
  everpure.flashblade.purefb_export:
    name: foo_nfs
    filesystem: foo
    type: NFS
    export_policy: nfs_pol1
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

- name: Attach SMB share and client policies to filesystem foo via purefb_export
  everpure.flashblade.purefb_export:
    name: foo_smb
    filesystem: foo
    type: SMB
    share_policy: smb_share_pol1
    client_policy: smb_client_pol1
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641

Authors

  • Everpure Ansible Team (@sdodsley)