Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InsecureRequestWarning: Unverified HTTPS request is being made to host '*.*.*.*' #57

Open
papseddy opened this issue Jul 15, 2020 · 1 comment

Comments

@papseddy
Copy link

Hi,

Thanks for the code. But when I try to use vmanage_central_policy_facts in playbook it shoots error.

fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host .... Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host '...'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host '...'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\nTraceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1594810769.693978-23372-142208380288382/AnsiballZ_vmanage_central_policy_facts.py", line 102, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1594810769.693978-23372-142208380288382/AnsiballZ_vmanage_central_policy_facts.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1594810769.693978-23372-142208380288382/AnsiballZ_vmanage_central_policy_facts.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.vmanage_central_policy_facts', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib64/python3.6/runpy.py", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_vmanage_central_policy_facts_payload_8cudxles/ansible_vmanage_central_policy_facts_payload.zip/ansible/modules/vmanage_central_policy_facts.py", line 44, in \n File "/tmp/ansible_vmanage_central_policy_facts_payload_8cudxles/ansible_vmanage_central_policy_facts_payload.zip/ansible/modules/vmanage_central_policy_facts.py", line 41, in main\n File "/tmp/ansible_vmanage_central_policy_facts_payload_8cudxles/ansible_vmanage_central_policy_facts_payload.zip/ansible/modules/vmanage_central_policy_facts.py", line 36, in run_module\n File "/tmp/ansible_vmanage_central_policy_facts_payload_8cudxles/ansible_vmanage_central_policy_facts_payload.zip/ansible/module_utils/viptela.py", line 408, in get_central_policy_list\n File "/usr/lib64/python3.6/json/init.py", line 354, in loads\n return _default_decoder.decode(s)\n File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode\n raise JSONDecodeError("Expecting value", s, err.value) from None\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

Moreover, other libraries working fine.
Any help really appreciate.

@DelmiroCampelo
Copy link

Hi there, try adding the code below. It resolved the certificate issue for me.

import urllib3
urllib3.disable_warnings()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants