purestorage.flashblade.purefb_fs – Manage filesystemon Pure Storage FlashBlade`
Note
This plugin is part of the purestorage.flashblade collection (version 1.4.0).
To install it use: ansible-galaxy collection install purestorage.flashblade.
To use it in a playbook, specify: purestorage.flashblade.purefb_fs.
New in version 1.0.0: of purestorage.flashblade
Synopsis
- This module manages filesystems 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 | Choices/Defaults | Comments | 
|---|---|---|
|   api_token    string    |    FlashBlade API token for admin privileged user.   |  |
|   delete_link    boolean    |   
  |    Define if the filesystem can be deleted even if it has a replica link   |  
|   discard_snaps    boolean    |   
  |    Allow a filesystem to be demoted.   |  
|   eradicate    boolean    |   
  |    Define whether to eradicate the filesystem on delete or leave in trash.   |  
|   fastremove    boolean    |   
  |    Define whether the fast remove directory is enabled for the filesystem.   |  
|   fb_url    string    |    FlashBlade management IP address or Hostname.   |  |
|   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.   |  
|   http    boolean    |   
  |    Define whether to HTTP/HTTPS protocol is enabled for the filesystem.   |  
|   name    string / required    |    Filesystem Name.   |  |
|   nfs_rules    string    |    Define the NFS rules in operation.  If not set at filesystem creation time it defaults to *(rw,no_root_squash)  Supported binary options are ro/rw, secure/insecure, fileid_32bit/no_fileid_32bit, root_squash/no_root_squash, all_squash/no_all_squash and atime/noatime  Supported non-binary options are anonuid=#, anongid=#, sec=(sys|krb5)   |  |
|   nfsv3    boolean    |   
  |    Define whether to NFSv3 protocol is enabled for the filesystem.   |  
|   nfsv4    boolean    |   
  |    Define whether to NFSv4.1 protocol is enabled for the filesystem.   |  
|   policy    string    |    Filesystem policy to assign to or remove from a filesystem.   |  |
|   policy_state    string    |   
  |    Add or delete a policy from a filesystem   |  
|   promote    boolean    |   
  |    Promote/demote a filesystem.  Can only demote the file-system if it is in a replica-link relationship.   |  
|   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.   |  
|   smb_aclmode    string    |   
  |    Specify the ACL mode for the SMB protocol.   |  
|   snapshot    boolean    |   
  |    Define whether a snapshot directory is enabled for the filesystem.   |  
|   state    string    |   
  |    Create, delete or modifies a filesystem.   |  
|   user_quota    string    |    Default quota in M, G, T or P units for a user under this file system.   |  |
|   writable    boolean    |   
  |    Define if a filesystem is writeable.   |  
Notes
Note
- This module requires the 
purity_fbPython library - You must set 
PUREFB_URLandPUREFB_APIenvironment variables if fb_url and api_token arguments are not passed to the module directly 
Examples
- name: Create new filesystem named foo
  purefb_fs:
    name: foo
    size: 1T
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete filesystem named foo
  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
  purefb_fs:
    name: foo
    state: present
    fb_url: 10.10.10.2
    api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Eradicate filesystem named foo
  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
  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
  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
  purefb_fs:
    name: foo
    size: 2T
    nfsv3 : false
    nfsv4 : true
    user_quota: 10K
    group_quota: 25M
    nfs_rules: '10.21.200.0/24(ro)'
    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
  Authors
- Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>
 
    © 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
    https://docs.ansible.com/ansible/2.10/collections/purestorage/flashblade/purefb_fs_module.html