Flashblade & Ansible collection
Hello community, We are facing some issues with our FlashBlade when provisioning policies with Ansible. We have updated all the components (py-pure-client and the collection), and we are failing on a simple policy deployment. - name: Test purestorage.flashblade.purefb_policy: name: "filesystem_export_policy" enabled: True policy_type: "nfs" at: True client: "mynfsexport.flashblade.local" secure: True security: "sys" permission: "rw" access: "no-squash" fb_url: "{{ fb_host }}" api_token: "{{ fb_api_token }}" The complete stack trace is : The full traceback is: Traceback (most recent call last): File "/home/user/.ansible/tmp/ansible-tmp-1778656887.1852276-3067455-48057529014464/AnsiballZ_purefb_policy.py", line 107, in <module> _ansiballz_main() File "/home/user/.ansible/tmp/ansible-tmp-1778656887.1852276-3067455-48057529014464/AnsiballZ_purefb_policy.py", line 99, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/home/user/.ansible/tmp/ansible-tmp-1778656887.1852276-3067455-48057529014464/AnsiballZ_purefb_policy.py", line 47, in invoke_module runpy.run_module(mod_name='ansible_collections.purestorage.flashblade.plugins.modules.purefb_policy', init_globals=dict(_module_fqn='ansible_collections.purestorage.flashblade.plugins.modules.purefb_policy', _modlib_path=modlib_path), File "<frozen runpy>", line 226, in run_module File "<frozen runpy>", line 98, in _run_module_code File "<frozen runpy>", line 88, in _run_code File "/opt/tmp/tmp/ansible_purestorage.flashblade.purefb_policy_payload_xaietsz7/ansible_purestorage.flashblade.purefb_policy_payload.zip/ansible_collections/purestorage/flashblade/plugins/modules/purefb_policy.py", line 4233, in <module> File "/opt/tmp/tmp/ansible_purestorage.flashblade.purefb_policy_payload_xaietsz7/ansible_purestorage.flashblade.purefb_policy_payload.zip/ansible_collections/purestorage/flashblade/plugins/modules/purefb_policy.py", line 4008, in main File "/opt/tmp/tmp/ansible_purestorage.flashblade.purefb_policy_payload_xaietsz7/ansible_purestorage.flashblade.purefb_policy_payload.zip/ansible_collections/purestorage/flashblade/plugins/modules/purefb_policy.py", line 2392, in update_nfs_policy AttributeError: 'ErrorResponse' object has no attribute 'items' fatal: [localhost]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/user/.ansible/tmp/ansible-tmp-1778656887.1852276-3067455-48057529014464/AnsiballZ_purefb_policy.py\", line 107, in <module>\n _ansiballz_main()\n File \"/home/user/.ansible/tmp/ansible-tmp-1778656887.1852276-3067455-48057529014464/AnsiballZ_purefb_policy.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/user/.ansible/tmp/ansible-tmp-1778656887.1852276-3067455-48057529014464/AnsiballZ_purefb_policy.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.purestorage.flashblade.plugins.modules.purefb_policy', init_globals=dict(_module_fqn='ansible_collections.purestorage.flashblade.plugins.modules.purefb_policy', _modlib_path=modlib_path),\n File \"<frozen runpy>\", line 226, in run_module\n File \"<frozen runpy>\", line 98, in _run_module_code\n File \"<frozen runpy>\", line 88, in _run_code\n File \"/opt/tmp/tmp/ansible_purestorage.flashblade.purefb_policy_payload_xaietsz7/ansible_purestorage.flashblade.purefb_policy_payload.zip/ansible_collections/purestorage/flashblade/plugins/modules/purefb_policy.py\", line 4233, in <module>\n File \"/opt/tmp/tmp/ansible_purestorage.flashblade.purefb_policy_payload_xaietsz7/ansible_purestorage.flashblade.purefb_policy_payload.zip/ansible_collections/purestorage/flashblade/plugins/modules/purefb_policy.py\", line 4008, in main\n File \"/opt/tmp/tmp/ansible_purestorage.flashblade.purefb_policy_payload_xaietsz7/ansible_purestorage.flashblade.purefb_policy_payload.zip/ansible_collections/purestorage/flashblade/plugins/modules/purefb_policy.py\", line 2392, in update_nfs_policy\nAttributeError: 'ErrorResponse' object has no attribute 'items'\n", "module_stdout": "", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1 } If the policy is already set, the playbook runs perfectly fine. The problem occurs when a new policy is injected. However, we have to install the collection from GitHub. It seems that the artifact built and installed by Ansible Galaxy is not correct. Some commits are not propagated. For example, with the FlashBlade collection 1.24 (installed from Galaxy), we have: >>> from pypureclient.flashblade import ( ... PolicyRuleObjectAccessCondition, ... PolicyRuleObjectAccessPost, ... PolicyRuleObjectAccess, ... NfsExportPolicy, ... NfsExportPolicyRule, ... Policy, ... PolicyPatch, ... PolicyRule, ... SmbSharePolicyRule, ... SmbSharePolicy, ... SmbClientPolicyRule, ... SmbClientPolicy, ... ObjectStoreAccessPolicyPost, ... NetworkAccessPolicy, ... NetworkAccessPolicyRule, ... WormDataPolicy, ... ) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/user/conda/envs/ansible/lib/python3.12/site-packages/pypureclient/flashblade/__init__.py", line 40, in __getattr__ raise ImportError(f'module {__package__} has no attribute {name}') ImportError: module pypureclient.flashblade has no attribute PolicyPatch We have compared the archive from GitHub and there are many differences with the upstream collection code. To help, find my my env package : Package Version ----------------- ----------- annotated-types 0.7.0 ansible-core 2.18.5 bcrypt 5.0.0 certifi 2026.4.22 cffi 2.0.0 cryptography 44.0.0 dnspython 2.8.0 invoke 3.0.3 Jinja2 3.1.4 MarkupSafe 2.1.1 packaging 24.1 paramiko 5.0.0 pip 24.2 py-pure-client 1.88.0 pycparser 2.22 pydantic 2.13.4 pydantic_core 2.46.4 PyJWT 2.12.1 PyNaCl 1.6.2 python-dateutil 2.9.0.post0 PyYAML 6.0.2 resolvelib 1.0.1 setuptools 75.8.2 six 1.17.0 typing_extensions 4.15.0 typing-inspection 0.4.2 urllib3 2.7.0 wheel 0.45.0 And our flashblades are running the Purity//FB 4.6.9. If anyone has a lead to help us get our Ansible back up and running, I thank them in advance. We appreciate your help. Matth602Views0likes10CommentsNew Pure Code site is live!
After many months of messing with some very old code, we have launched a revised site for the Pure Code Portal. It is much more minimalistic and cleaner than the old one, and we have plans to add our Code videos and Pure Employee website links in the near future. Have a look and feel free to leave a comment if you would like to see something on the site. https://code.purestorage.com/ Cheers, //Mike316Views2likes1CommentRecently we are getting: "API version does not support
Recently we are getting: "API version does not support setting SafeMode on a protection group." during some of our ansible builds when it is trying to add a volume to a PG that already has safemode enabled. We are on purity 6.7.1 and this has been working for quite a while. This started failing last week I believe and the only software related changes were applying the security_patch_fa_2025_A. Wondering is that messing with the version logic ansible is doing to check if safemode is supported? https://github.com/Pure-Storage-Ansible/FlashArray-Collection/issues/329|https://github.com/Pure-Storage-Ansible/FlashArray-Collection/issues/329237Views0likes1CommentFormation of the Ansible Working Group
Happy to announce the formation of the Ansible Storage Working Group. You can join the discussions here: https://matrix.to/#/#storage:ansible.com. There is also a Working Group https://github.com/ansible/community/wiki/Storage|Wiki page.148Views4likes0CommentsWe are using the Ansible Modules to run some testing.
We are using the Ansible Modules to run some testing. Anytime we try to use the purefa_info module in the purestorage.flasharray collection. This is the error we get, other modules work fine. Anyone encounter this have any guidance. `TASK [Grab info] ***********************************************************************************************************************************************************************************` fatal: [localhost]: FAILED! => {“changed”: false, “module_stderr”: “/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py InsecureRequestWarning: Unverified HTTPS request is being made to host ‘http://us-wcp-sp-pur-lab-01.qvcdev.qvc.net|us-wcp-sp-pur-lab-01.qvcdev.qvc.net’. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n warnings.warn(\nTraceback (most recent call last):\n File \“/Users/q1431233/.ansible/tmp/ansible-tmp-1680037549.953009-19922-124783552331072/AnsiballZ_purefa_info.py\“, line 107, in <module>\n _ansiballz_main()\n File \“/Users/q1431233/.ansible/tmp/ansible-tmp-1680037549.953009-19922-124783552331072/AnsiballZ_purefa_info.py\“, line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \“/Users/q1431233/.ansible/tmp/ansible-tmp-1680037549.953009-19922-124783552331072/AnsiballZ_purefa_info.py\“, line 47, in invoke_module\n runpy.run_module(mod_name=‘ansible_collections.purestorage.flasharray.plugins.modules.purefa_info’, init_globals=dict(_module_fqn=‘ansible_collections.purestorage.flasharray.plugins.modules.purefa_info’, _modlib_path=modlib_path),\n File \“<frozen runpy>\“, line 226, in run_module\n File \“<frozen runpy>\“, line 98, in _run_module_code\n File \“<frozen runpy>\“, line 88, in _run_code\n File \“/var/folders/fb/vw9q4b9d5xs9wmrsx3s56cdjsggj6w/T/ansible_purefa_info_payload_wsm285r2/ansible_purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py\“, line 2083, in <module>\n File \“/var/folders/fb/vw9q4b9d5xs9wmrsx3s56cdjsggj6w/T/ansible_purefa_info_payload_wsm285r2/ansible_purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py\“, line 2008, in main\n File \“/var/folders/fb/vw9q4b9d5xs9wmrsx3s56cdjsggj6w/T/ansible_purefa_info_payload_wsm285r2/ansible_purefa_info_payload.zip/ansible_collections/purestorage/flasharray/plugins/modules/purefa_info.py\“, line 583, in generate_config_dict\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/client.py\“, line 7133, in get_directory_services\n return self._call_api(endpoint, kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/client.py\“, line 28551, in _call_api\n response = api_function(**kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api/directory_services_api.py\“, line 132, in api217_directory_services_get_with_http_info\n return self.api_client.call_api(\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 327, in call_api\n return self.__call_api(resource_path, method,\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 170, in __call_api\n return_data = self.deserialize(response_data, response_type)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 243, in deserialize\n return self.__deserialize(data, response_type)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 282, in __deserialize\n return self.__deserialize_model(data, klass)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 632, in __deserialize_model\n kwargs[attr] = self.__deserialize(value, attr_type)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 259, in __deserialize\n return [self.__deserialize(sub_data, sub_kls)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 259, in <listcomp>\n return [self.__deserialize(sub_data, sub_kls)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 282, in __deserialize\n return self.__deserialize_model(data, klass)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/api_client.py\“, line 634, in __deserialize_model\n instance = klass(**kwargs)\n ^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/models/directory_service.py\“, line 96, in __init__\n http://self.ca|self.ca_certificate = ca_certificate\n ^^^^^^^^^^^^^^^^^^^\n File \“/usr/local/lib/python3.11/site-packages/pypureclient/flasharray/FA_2_17/models/directory_service.py\“, line 113, in __setattr__\n raise ValueError(\“Invalid value for `ca_certificate`, length must be less than or equal to `3000`\“)\nValueError: Invalid value for `ca_certificate`, length must be less than or equal to `3000`\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}139Views0likes0CommentsI was referred here by Pure Support regarding an issue
I was referred here by Pure Support regarding an issue with the "volume" function of the Ansible plugin for FlashArray Case Number: CS0053963 Created: Jun 8, 2022 3:04 pm Primary contact: Samuel Lay Description: Here is my playbook: --- - name: Create a Snapshot of Pure volume hosts: all connection: local collections: - purestorage.flasharray gather_facts: no roles: - role: pure_create_clone Here is the role: --- - name: Create Clone of Pure volume purestorage.flasharray.purefa_volume: target: "{{ target }}" name: "{{ volume_name }}" fa_url: "{{ ip }}" api_token: "{{ api_token }}" state: present When I run without size parameter, I get . . . fatal: [syn14p01st001]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "Size must be specified to create a new volume"} When I add the size parameter to the role: fatal: [syn14p01st001]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "parameters are mutually exclusive: size|target"} Command line: ansible-playbook -l syn14p01st001 -e "target=testvol0" -e "volume_name=clonotesvol00" _pure_create_clone.ym The output from the plugin is mutually exclusive.118Views0likes0CommentsIs there a way to view lower level Fibre Channel diagnostic
Is there a way to view lower level Fibre Channel diagnostic logs from the CLI? We are having an issue with some VMware hosts not getting a response to a PLOGI so they are not able to see any volumes from the Pure array on one of our fabrics. Other storage systems on the same fabric are working fine.110Views0likes0CommentsFlashBlade Ansible Collection 1.22.0 released!
🎊 FlashBlade Ansible Collection 1.22.0 THIS IS A SIGNIFICANT RELEASE as removes all REST v1 components from the collection and adds Fusion support! Update your collections! Download the Collection via Ansible command: ansible-galaxy collection install purestorage.flashblade Download it from Ansible Galaxy here Read the Release Notes here.107Views2likes0Comments