I recently discovered the module VMware_guest for ansible. I would like to know how it’s work. Indeed I installed ansible version 2.3.2.0. and the module python 2.7.6 and PyVmomi.
And when I run a ansible-playbook like this :
And when I run the playbook I see the following message :
ERROR! ‘local_action’ is not a valid attribute for a Play
The error appears to have been in ‘/etc/ansible/Vmware.yml’: line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
name: Gather all registered virtual machines
^ here
Thanks for you reply. I discovered this soft recently so I don’t realy have the knowledge to complete my YML.
I treid to search how I can delete a VM on VMware and I create this Playbook with your advice :
hosts: all
gather_facts: false
connection: local
vars_prompt :
I suggest removing the vars_prompt stuff and hard coding values until you have the vmware_guest module doing something.
Also worth using the debug module to display the contents of any vars you are creating so that you can be sure that they contain values that you expect, like this.
but when I run this playbook I have this error messagee :
ERROR! conflicting action statements: hostname, vmware_guest
The error appears to have been in ‘/etc/ansible/new.yml’: line 8, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
var: notes
vmware_guest:
^ here
The error appears to have been in ‘/etc/ansible/new.yml’: line 8, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
var: notes