According to the documentation on the web http://docs.ansible.com/ansible/latest/vmware_guest_snapshot_module.html *vmware_guest_snapshot - Manages virtual machines snapshots in vcenter *Requirements : python >= 2.6 & *PyVmomi *but ...
- settings "validate_certs: True" option, it shows : pyVim does not support changing verification mode with python < 2.7.9. Either update python or or use validate_certs=false" - settings "validate_certs: False" option, it shows : AttributeError: 'module' object has no attribute 'SSLContext' I try with pyvmomi 5.5.0 and 6.0.0 Name: pyvmomi Version: 6.0.0 Summary: VMware vSphere Python SDK Home-page: https://github.com/vmware/pyvmomi Author: VMware, Inc. Author-email: jhu@***.com License: License :: OSI Approved :: Apache Software License Location: /usr/lib/python2.6/site-packages Requires: requests, six El viernes, 17 de noviembre de 2017, 9:38:56 (UTC+1), Josu Vilda escribió: > > > Hello, > I'm having problems with module vmware_guest_snapshot. Any solution? > > > [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 > > > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e1f910da-a023-43d0-bc98-042545b26d06%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.