Pure-Storage-Ansible / FlashArray-Collection

Ansible Collection for Pure Storage FlashArray
GNU General Public License v3.0
18 stars 21 forks source link

Ignore SSL Invalid Cert #575

Closed cambriajw closed 1 day ago

cambriajw commented 1 month ago

Is your feature request related to a problem? Please describe. Yes, we currently are using a self sign certificate and having problems now with purestorage.flasharray.purefa_snap connecting to the array.

Describe the solution you'd like Please add an option to ignore SSL certificates that are "not secure" as they are self sign certs. and dont have the full chain.

Describe alternatives you've considered Had to add bottom 3 values to ansible.cfg to work around issue

[defaults] # paths to search for roles in, colon separated library = ./library collections_path = ./collections roles_path = ./roles host_key_checking = false deprecation_warnings = false interpreter_python = auto_silent

*Additional context**

sdodsley commented 1 month ago

Can you please show the failure for the purefa_snap module? Please show the output from ansible-playbook -vvvv <playbook>

cambriajw commented 1 month ago

failed: [servername -> localhost] (item={'key': 'u02', 'value': {'source': 'pldb0000-u02-db-ebsp', 'target': 'servername-u02-db-ebspatch'}}) => {"ansible_loop_var": "item", "changed": false, "item": {"key": "u02", "value": {"source": "pldb0000-u02-db-ebsp", "target": "servername-u02-db-ebspatch"}}, "module_stderr": "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'PureArray01'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n warnings.warn(\n/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'PureArray01'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n warnings.warn(\nTraceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1717161433.5…

cambriajw commented 1 month ago
- name: Take Snapshot of Protetion Group of "{{ pg_name }}"
  purestorage.flasharray.purefa_pgsnap:
    name: "{{ pg_name }}"
    suffix: "{{ pg_suffix }}-{{ ansible_date_time.date }}"
    now: yes
    api_token: "{{ api_token }}"
    fa_url: "{{ source_pure }}"
  delegate_to: localhost
  register: pgsnap
cambriajw commented 1 month ago

Seems like there are some messages that were happening on the Python side.

sdodsley commented 1 month ago

I need the full output from the -vvvv please. Also please confirm the version of the FlashArray Collection you are using and the py-pure-client SDK

cambriajw commented 1 month ago

[root@test orca]# ./ansible-requirements-install.sh Starting galaxy collection install process Process install dependency map Starting collection install process Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/ansible-posix-1.5.4.tar.gz to /root/.ansible/tmp/ansible-local-2658438thvyfi7h/tmpqlqlygkp/ansible-posix-1.5.4-69ovofh0 Installing 'ansible.posix:1.5.4' to '/opt/repo/orca/collections/ansible_collections/ansible/posix' ansible.posix:1.5.4 was installed successfully Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/purestorage-flasharray-1.28.0.tar.gz to /root/.ansible/tmp/ansible-local-2658438thvyfi7h/tmpqlqlygkp/purestorage-flasharray-1.28.0-lib9czvg Installing 'purestorage.flasharray:1.28.0' to '/opt/repo/orca/collections/ansible_collections/purestorage/flasharray' purestorage.flasharray:1.28.0 was installed successfully Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-general-9.0.1.tar.gz to /root/.ansible/tmp/ansible-local-2658438thvyfi7h/tmpqlqlygkp/community-general-9.0.1-n9wwijlu Installing 'community.general:9.0.1' to '/opt/repo/orca/collections/ansible_collections/community/general' community.general:9.0.1 was installed successfully

cambriajw commented 1 month ago

purestorage 1.19.0 py-pure-client 1.47.0