CiscoDevNet / python-viptela

Cisco Viptela vManage Python CLI/SDK
GNU General Public License v3.0
96 stars 64 forks source link

InsecureRequestWarning when using vmanage_policy_definition_facts for ansible #142

Open tc45 opened 2 years ago

tc45 commented 2 years ago

I get a failed task when attempting to use vmanage_policy_definition_facts with the error. I am using this within the devnet sandbox for SDWAN. I have other tasks that run without this issue, it seems to only be this module.

fatal: [10.10.20.90]: FAILED! => {"changed": false, "module_stderr": "/home/developer/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.20.90'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/home/developer/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.20.90'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/home/developer/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.20.90'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/home/developer/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.20.90'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/home/developer/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.20.90'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/home/developer/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.20.90'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/home/developer/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.20.90'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/home/developer/.local/lib/python2.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.20.90'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\nTraceback (most recent call last):\n File \"/home/developer/.ansible/tmp/ansible-tmp-1633462680.0976634-9383-119258551443063/AnsiballZ_vmanage_policy_definition_facts.py\", line 100, in \n _ansiballz_main()\n File \"/home/developer/.ansible/tmp/ansible-tmp-1633462680.0976634-9383-119258551443063/AnsiballZ_vmanage_policy_definition_facts.py\", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/developer/.ansible/tmp/ansible-tmp-1633462680.0976634-9383-119258551443063/AnsiballZ_vmanage_policy_definition_facts.py\", line 41, in invoke_module\n run_name='main', alter_sys=True)\n File \"/usr/lib64/python2.7/runpy.py\", line 176, in run_module\n fname, loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/tmp/ansible_vmanage_policy_definition_facts_payload_nsfmYg/ansible_vmanage_policy_definition_facts_payload.zip/ansible/modules/vmanage_policy_definition_facts.py\", line 60, in \n File \"/tmp/ansible_vmanage_policy_definition_facts_payload_nsfmYg/ansible_vmanage_policy_definition_facts_payload.zip/ansible/modules/vmanage_policy_definition_facts.py\", line 57, in main\n File \"/tmp/ansible_vmanage_policy_definition_facts_payload_nsfmYg/ansible_vmanage_policy_definition_facts_payload.zip/ansible/modules/vmanage_policy_definition_facts.py\", line 46, in run_module\nKeyError: 'sequences'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

This is the entirety of my playbook: