Hi All, I'm getting the Following Error When trying to Run an Ansible Playbook. even when i have validate_certs Set to False, it's still displaying the issue.
Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py --- - hosts: localhost gather_facts: false tasks: - name: Deploy Virtual Machine from template in content library vmware_content_deploy_template: hostname: "{{ Host }}" username: "{{ user }}" password: "{{ pass }}" template: WIN10-V3-SDBLD12 datastore: "{{ datastore }}" folder: /vm datacenter: Cork host: "{{ ESXi }}" name: Test_Machine validate_certs: False state: present delegate_to: localhost ansible-playbook t.yaml -vvvvv ansible-playbook 2.9.9 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/dist-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.17 (default, Apr 15 2020, 17:20:14) [GCC 7.5.0] Using /etc/ansible/ansible.cfg as config file setting up inventory plugins host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method Parsed /etc/ansible/hosts inventory source with ini plugin Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/default.pyc PLAYBOOK: t.yaml **********************************************************************************************************************************************************************************************************************Positional arguments: t.yaml become_method: sudo inventory: (u'/etc/ansible/hosts',) forks: 5 tags: (u'all',) verbosity: 5 connection: smart timeout: 10 1 plays in t.yaml PLAY [localhost] **********************************************************************************************************************************************************************************************************************META: ran handlers TASK [Deploy Virtual Machine from template in content library] ************************************************************************************************************************************************************************task path: /srv/ansible/t.yaml:5 <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root <localhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir /root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677 && echo ansible-tmp-1589555313.13-6894-196031450684677="` echo /root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677 `" ) && sleep 0' Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/_text.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/vmware.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/vmware_rest_client.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/basic.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/six/__init__.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/urls.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/_collections_compat.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/__init__.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/text/formatters.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/validation.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/text/converters.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/pycompat24.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/text/__init__.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/process.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/parsing/convert_bool.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/_utils.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/parameters.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/parsing/__init__.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/_json_compat.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/sys_info.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/file.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/common/collections.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/distro/__init__.py Using module_utils file /usr/lib/python2.7/dist-packages/ansible/module_utils/distro/_distro.py Using module file /usr/lib/python2.7/dist-packages/ansible/modules/cloud/vmware/vmware_content_deploy_template.py <localhost> PUT /root/.ansible/tmp/ansible-local-6887q_iAgx/tmpOMKInk TO /root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677/AnsiballZ_vmware_content_deploy_template.py <localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677/ /root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677/AnsiballZ_vmware_content_deploy_template.py && sleep 0' <localhost> EXEC /bin/sh -c '/usr/bin/python2 /root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677/AnsiballZ_vmware_content_deploy_template.py && sleep 0' <localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677/ > /dev/null 2>&1 && sleep 0' fatal: [localhost -> localhost]: FAILED! => { "changed": false, "module_stderr": "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. 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-1589555313.13-6894-196031450684677/AnsiballZ_vmware_content_deploy_template.py\", line 102, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677/AnsiballZ_vmware_content_deploy_template.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1589555313.13-6894-196031450684677/AnsiballZ_vmware_content_deploy_template.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.cloud.vmware.vmware_content_deploy_template', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib/python2.7/runpy.py\", line 188, in run_module\n fname, loader, pkg_name)\n File \"/usr/lib/python2.7/runpy.py\", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code\n exec code in run_globals\n File \"/tmp/ansible_vmware_content_deploy_template_payload_F5VGf7/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py\", line 271, in <module>\n File \"/tmp/ansible_vmware_content_deploy_template_payload_F5VGf7/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py\", line 258, in main\n File \"/tmp/ansible_vmware_content_deploy_template_payload_F5VGf7/ansible_vmware_content_deploy_template_payload.zip/ansible/modules/cloud/vmware/vmware_content_deploy_template.py\", line 209, in deploy_vm_from_template\n File \"/usr/local/lib/python2.7/dist-packages/com/vmware/vcenter/vm_template_client.py\", line 2110, in deploy\n 'spec': spec,\n File \"/usr/local/lib/python2.7/dist-packages/vmware/vapi/bindings/stub.py\", line 345, in _invoke\n return self._api_interface.native_invoke(ctx, _method_name, kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/vmware/vapi/bindings/stub.py\", line 298, in native_invoke\n self._rest_converter_mode)\ncom.vmware.vapi.std.errors_client.OperationNotFound: {error_type : None, messages : [LocalizableMessage(default_message=\"Cannot find service 'com.vmware.vcenter.vm_template.library_items'.\", args=['com.vmware.vcenter.vm_template.library_items'], params=None, id='vapi.method.input.invalid.interface', localized=None)], data : None}\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning)\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } PLAY RECAP ****************************************************************************************************************************************************************************************************************************localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2801d376-5d5e-44c7-8828-350a485e1a04%40googlegroups.com.
