### FlashBlade Connection and Info Gathering with Ansible Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt Demonstrates how to connect to a Pure Storage FlashBlade using Ansible, showcasing both direct API token authentication and environment variable-based authentication. It also includes an example of disabling SSL warnings for connections. This module fetches information about the FlashBlade. ```yaml - name: Basic authentication using module parameters purestorage.flashblade.purefb_info: fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 register: blade_info - name: Authentication using environment variables purestorage.flashblade.purefb_info: # Uses PUREFB_URL and PUREFB_API environment variables environment: PUREFB_URL: "10.10.10.2" PUREFB_API: "T-55a68eb5-c785-4720-a2ca-8b03903bf641" register: blade_info - name: Disable SSL certificate warnings purestorage.flashblade.purefb_bucket: name: secure-bucket account: production fb_url: flashblade.example.com api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 disable_warnings: true ``` -------------------------------- ### Manage Pure Storage FlashBlade Filesystems with Ansible Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt Manage filesystems on Pure Storage FlashBlade using Ansible, supporting NFS and SMB protocols. This includes creating, resizing, and deleting filesystems, configuring quotas, access controls, and replication settings. Ensure the 'purestorage.flashblade' collection is installed and provide FlashBlade connection details. ```yaml - name: Create basic NFS filesystem purestorage.flashblade.purefb_fs: name: data-nfs size: 10T nfsv3: true nfsv4: true nfs_rules: "*(rw,no_root_squash)" fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 state: present - name: Create SMB filesystem with quotas purestorage.flashblade.purefb_fs: name: department-share size: 5T smb: true nfsv3: false nfsv4: false user_quota: 100G group_quota: 500G hard_limit: true access_control: smb continuous_availability: true fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Configure multi-protocol filesystem purestorage.flashblade.purefb_fs: name: shared-data size: 20T nfsv4: true smb: true http: true access_control: shared snapshot: true fastremove: true fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Apply NFS export policy to filesystem purestorage.flashblade.purefb_fs: name: data-nfs export_policy: secure-exports fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Apply SMB policies to filesystem purestorage.flashblade.purefb_fs: name: department-share share_policy: standard-smb client_policy: windows-clients fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Resize filesystem and update quotas purestorage.flashblade.purefb_fs: name: data-nfs size: 15T user_quota: 200G group_quota: 1T fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Promote filesystem in replica relationship purestorage.flashblade.purefb_fs: name: replica-target promote: true fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Delete filesystem with eradication purestorage.flashblade.purefb_fs: name: old-filesystem state: absent eradicate: true fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Recover deleted filesystem purestorage.flashblade.purefb_fs: name: old-filesystem state: present fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 ``` -------------------------------- ### Manage Pure Storage FlashBlade S3 Buckets with Ansible Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt Manage S3 buckets on Pure Storage FlashBlade using Ansible. This includes creating, enabling versioning, configuring object lock, setting quotas, and deleting buckets. Ensure the 'purestorage.flashblade' collection is installed and provide FlashBlade connection details. ```yaml - name: Create basic S3 bucket purestorage.flashblade.purefb_bucket: name: application-data account: production-s3 quota: 5T hard_limit: false fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 state: present - name: Enable versioning on bucket purestorage.flashblade.purefb_bucket: name: application-data account: production-s3 versioning: enabled fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Configure compliance bucket with object lock purestorage.flashblade.purefb_bucket: name: audit-logs account: compliance-s3 object_lock_enabled: true retention_mode: compliance retention_lock: ratcheted default_retention: "365" freeze_locked_objects: true fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Update bucket quota and enforce hard limit purestorage.flashblade.purefb_bucket: name: application-data account: production-s3 quota: 2T hard_limit: true fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Configure eradication settings purestorage.flashblade.purefb_bucket: name: temp-data account: development-s3 eradication_mode: retention-based eradication_delay: 7 manual_eradication: false fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Delete and eradicate bucket purestorage.flashblade.purefb_bucket: name: old-bucket account: production-s3 state: absent eradicate: true fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Recover deleted bucket from trash purestorage.flashblade.purefb_bucket: name: old-bucket account: production-s3 state: present fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 ``` -------------------------------- ### Ansible: Bulk Provisioning FlashBlade S3 Accounts, Buckets, and Filesystems Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt This Ansible playbook demonstrates bulk provisioning of S3 accounts, buckets, and filesystems on a Pure Storage FlashBlade using loops. It iterates over a list of departments, creating corresponding resources with specified configurations. Dependencies include the `purestorage.flashblade` Ansible collection. Inputs are defined in the `vars` section, and outputs are registered in the `all_resources` variable. ```yaml --- - name: Bulk provisioning of departmental storage hosts: localhost gather_facts: false vars: fb_host: "10.10.10.2" fb_token: "T-55a68eb5-c785-4720-a2ca-8b03903bf641" departments: - { name: "engineering", fs_size: "20T", bucket_quota: "10T", user_quota: "500G" } - { name: "marketing", fs_size: "5T", bucket_quota: "2T", user_quota: "100G" } - { name: "finance", fs_size: "10T", bucket_quota: "5T", user_quota: "250G" } tasks: - name: Create S3 accounts for all departments purestorage.flashblade.purefb_s3acc: name: "{{ item.name }}-s3" quota: "{{ item.bucket_quota }}" hard_limit: false fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" state: present loop: "{{ departments }}" - name: Create S3 buckets for all departments purestorage.flashblade.purefb_bucket: name: "{{ item.name }}-data" account: "{{ item.name }}-s3" quota: "{{ item.bucket_quota }}" versioning: enabled fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" state: present loop: "{{ departments }}" - name: Create filesystems for all departments purestorage.flashblade.purefb_fs: name: "{{ item.name }}-share" size: "{{ item.fs_size }}" smb: true user_quota: "{{ item.user_quota }}" access_control: smb snapshot: true fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" state: present loop: "{{ departments }}" - name: Collect information about all provisioned resources purestorage.flashblade.purefb_info: gather_subset: - filesystems - buckets - accounts fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" register: all_resources ``` -------------------------------- ### Provision Application Storage with FlashBlade Ansible Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt End-to-end workflow for provisioning application storage, including S3 accounts, buckets, NFS and SMB filesystems, and network VIPs using the Pure Storage FlashBlade Ansible collection. It registers and displays the provisioned resources. ```yaml --- - name: Provision complete application storage environment hosts: localhost gather_facts: false vars: fb_host: "10.10.10.2" fb_token: "T-55a68eb5-c785-4720-a2ca-8b03903bf641" app_name: "web-application" tasks: - name: Create object store account for application purestorage.flashblade.purefb_s3acc: name: "{{ app_name }}-s3" quota: 5T hard_limit: false default_quota: 100G fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" state: present register: s3_account - name: Create S3 buckets for application data purestorage.flashblade.purefb_bucket: name: "{{ item.name }}" account: "{{ app_name }}-s3" quota: "{{ item.quota }}" hard_limit: "{{ item.hard_limit }}" versioning: "{{ item.versioning }}" fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" state: present loop: - { name: "app-static-assets", quota: "1T", hard_limit: true, versioning: "enabled" } - { name: "app-user-uploads", quota: "2T", hard_limit: false, versioning: "enabled" } - { name: "app-backups", quota: "500G", hard_limit: true, versioning: "suspended" } - name: Create NFS filesystem for application logs purestorage.flashblade.purefb_fs: name: "{{ app_name }}-logs" size: 2T nfsv4: true nfsv3: false nfs_rules: "10.0.0.0/8(rw,no_root_squash),172.16.0.0/12(ro)" snapshot: true fastremove: true user_quota: 50G fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" state: present - name: Create SMB filesystem for shared application data purestorage.flashblade.purefb_fs: name: "{{ app_name }}-shared" size: 3T smb: true nfsv3: false nfsv4: false access_control: smb group_quota: 500G hard_limit: false continuous_availability: true fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" state: present - name: Create data network VIP purestorage.flashblade.purefb_network: name: "{{ app_name }}-vip" address: "10.21.200.150" services: data fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" state: present - name: Verify provisioning and collect information purestorage.flashblade.purefb_info: gather_subset: - filesystems - buckets - accounts - network fb_url: "{{ fb_host }}" api_token: "{{ fb_token }}" register: provisioned_resources - name: Display provisioned resources debug: msg: "Application {{ app_name }} storage provisioning complete" ``` -------------------------------- ### Configure FlashBlade Filesystem Replication for DR Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt Sets up disaster recovery replication for a filesystem between two FlashBlade arrays. This involves creating the filesystem on both primary and DR sites, establishing a connection, and configuring the replica link. It also includes a step to verify the replication status. ```yaml --- - name: Configure disaster recovery replication hosts: localhost gather_facts: false vars: primary_fb: "10.10.10.2" dr_fb: "10.20.20.2" fb_token: "T-55a68eb5-c785-4720-a2ca-8b03903bf641" tasks: - name: Create filesystem on primary site purestorage.flashblade.purefb_fs: name: production-data size: 50T nfsv4: true snapshot: true fb_url: "{{ primary_fb }}" api_token: "{{ fb_token }}" state: present - name: Create filesystem on DR site purestorage.flashblade.purefb_fs: name: production-data size: 50T nfsv4: true snapshot: true writable: false fb_url: "{{ dr_fb }}" api_token: "{{ fb_token }}" state: present - name: Create connection between FlashBlades purestorage.flashblade.purefb_connect: target_url: "{{ dr_fb }}" target_api: "{{ fb_token }}" state: present fb_url: "{{ primary_fb }}" api_token: "{{ fb_token }}" - name: Configure filesystem replica link purestorage.flashblade.purefb_fs_replica: name: production-data target: dr-flashblade state: present fb_url: "{{ primary_fb }}" api_token: "{{ fb_token }}" - name: Verify replication status purestorage.flashblade.purefb_info: gather_subset: - replication fb_url: "{{ primary_fb }}" api_token: "{{ fb_token }}" register: replication_status ``` -------------------------------- ### Ansible Management of Pure Storage FlashBlade S3 Accounts Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt Provides Ansible tasks for managing S3 object store accounts on a Pure Storage FlashBlade. This includes creating accounts with specified quotas, configuring public access restrictions, removing quota limits, and deleting accounts. It utilizes the `purefb_s3acc` module. ```yaml - name: Create object store account with quotas purestorage.flashblade.purefb_s3acc: name: production-s3 quota: 10T hard_limit: true default_quota: 100G default_hard_limit: false fb_url: 10.10.10.2 api_token: e31060a7-21fc-e277-6240-25983c6c4592 state: present - name: Configure public access restrictions purestorage.flashblade.purefb_s3acc: name: production-s3 block_new_public_policies: true block_public_access: true fb_url: 10.10.10.2 api_token: e31060a7-21fc-e277-6240-25983c6c4592 - name: Remove quota limits from account purestorage.flashblade.purefb_s3acc: name: production-s3 quota: "" fb_url: 10.10.10.2 api_token: e31060a7-21fc-e277-6240-25983c6c4592 - name: Delete object store account purestorage.flashblade.purefb_s3acc: name: production-s3 state: absent fb_url: 10.10.10.2 api_token: e31060a7-21fc-e277-6240-25983c6c4592 ``` -------------------------------- ### Gather FlashBlade System Information with Ansible Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt Retrieve comprehensive system information from a Pure Storage FlashBlade for monitoring, reporting, and automation. This module supports gathering default information, specific subsets like configuration or network details, or all available data. ```yaml - name: Collect default system information purestorage.flashblade.purefb_info: fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 register: blade_info - name: Display system summary debug: msg: | FlashBlade: {{ blade_info.purefb_info.default.flashblade_name }} Purity Version: {{ blade_info.purefb_info.default.purity_version }} Filesystems: {{ blade_info.purefb_info.default.filesystems }} Buckets: {{ blade_info.purefb_info.default.buckets }} Total Capacity: {{ blade_info.purefb_info.default.total_capacity }} - name: Collect specific information subsets purestorage.flashblade.purefb_info: gather_subset: - config - capacity - performance - network fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 register: blade_details - name: Collect comprehensive system data purestorage.flashblade.purefb_info: gather_subset: - all fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 register: complete_inventory - name: Collect storage resource information purestorage.flashblade.purefb_info: gather_subset: - filesystems - snapshots - buckets - accounts fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 register: storage_info - name: Collect replication and policy data purestorage.flashblade.purefb_info: gather_subset: - replication - policies - arrays fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 register: replication_info - name: Monitor capacity and set alert purestorage.flashblade.purefb_info: gather_subset: - capacity fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 register: capacity_check failed_when: capacity_check.purefb_info.capacity.total_capacity > 900000000000000 ``` -------------------------------- ### Manage FlashBlade Network Interfaces with Ansible Source: https://context7.com/pure-storage-ansible/flashblade-collection/llms.txt Configure virtual IP interfaces for data access and replication services on a Pure Storage FlashBlade. This module allows for creation, update, and removal of network interfaces, requiring connection details and interface specifications. ```yaml - name: Create data network interface purestorage.flashblade.purefb_network: name: vip-data-01 address: 10.21.200.100 services: data itype: vip fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 state: present - name: Create replication network interface purestorage.flashblade.purefb_network: name: vip-repl-01 address: 192.168.100.50 services: replication itype: vip fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 state: present - name: Update network interface IP address purestorage.flashblade.purefb_network: name: vip-data-01 address: 10.21.200.101 fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 - name: Remove network interface purestorage.flashblade.purefb_network: name: vip-data-01 state: absent fb_url: 10.10.10.2 api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.