What you have is a task that belongs to a tasks section
You need to put this in the context of a play see
http://docs.ansible.com/ansible/latest/playbooks_intro.html#playbook-language-example


Phil

2017-08-29 11:30 GMT+02:00 olivier pouilly <[email protected]>:

> Hi all,
>
> 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 :
>
> - name: Gather all registered virtual machines
>   local_action:
>     module: vmware_vm_facts
>     hostname: esxi_or_vcenter_ip_or_hostname
>     username: username
>     password: password
>
> 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
>
> do I forgot  Something ?
>
> Best Regards,
>
> --
> 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 post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/bb05dc34-b66b-4a55-9c85-fa132877e2e9%40googlegroups.
> com
> <https://groups.google.com/d/msgid/ansible-project/bb05dc34-b66b-4a55-9c85-fa132877e2e9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAB1FMuTy39UASaKTy_G_L1H_5kzjhP5n-AHQpsefba69Lp4ieA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to