[root@ges1ansibledes ansible]# ansible --version
ansible 2.4.1.0
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.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.6.6 (r266:84292, Nov 21 2013, 10:50:32) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
---
- hosts: "localhost"
user: *****
become: root
gather_facts: False
tasks:
- name: Create snapshot
vmware_guest_snapshot:
hostname: "{{ vCenter }}"
username: "******"
password: "******"
datacenter: "{{ datacenter_name }}"
name: "{{ vmw_name }}"
state: present
snapshot_name: "{{ snapname }}"
description: "{{ snapdescript }}"
validate_certs: false
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_hwi8NY/ansible_module_vmware_guest_snapshot.py", line 357, in <module>
main()
File "/tmp/ansible_hwi8NY/ansible_module_vmware_guest_snapshot.py", line 329, in main
pyv = PyVmomiHelper(module)
File "/tmp/ansible_hwi8NY/ansible_module_vmware_guest_snapshot.py", line 211, in __init__
self.content = connect_to_api(self.module)
File "/tmp/ansible_hwi8NY/ansible_modlib.zip/ansible/module_utils/vmware.py", line 398, in connect_to_api
AttributeError: 'module' object has no attribute 'SSLContext'
fatal: [localhost]: FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_hwi8NY/ansible_module_vmware_guest_snapshot.py\", line 357, in <module>\n main()\n File \"/tmp/ansible_hwi8NY/ansible_module_vmware_guest_snapshot.py\", line 329, in main\n pyv = PyVmomiHelper(module)\n File \"/tmp/ansible_hwi8NY/ansible_module_vmware_guest_snapshot.py\", line 211, in __init__\n self.content = connect_to_api(self.module)\n File \"/tmp/ansible_hwi8NY/ansible_modlib.zip/ansible/module_utils/vmware.py\", line 398, in connect_to_api\nAttributeError: 'module' object has no attribute 'SSLContext'\n",
"module_stdout": "",
"msg": "MODULE FAILURE",
"rc": 0
pyVim does not support changing verification mode with python < 2.7.9. Either update python or or use validate_certs=false"
AttributeError: 'module' object has no attribute 'SSLContext'
Name: pyvmomiVersion: 6.0.0Summary: VMware vSphere Python SDKHome-page: https://github.com/vmware/pyvmomiAuthor: VMware, Inc.Author-email: jhu@***.comLicense: License :: OSI Approved :: Apache Software LicenseLocation: /usr/lib/python2.6/site-packagesRequires: requests, six