The solution is to index the vsphere_guest module call under tasks, as 
Michael Dehaan posted, like this:

- hosts: localhost
  tasks:
    - vsphere_guest:
    vcenter_hostname: myvcenter


On Thursday, May 1, 2014 at 10:06:10 AM UTC-7, John Shen wrote:
>
> $ ansible-playbook vmtest.yml 
> ERROR: vsphere_guest is not a legal parameter in an Ansible Playbook
> $ ansible --version
> ansible 1.6 (devel c0f92317ef) last updated 2014/05/01 10:56:27 (GMT -600)
>
> i used the first example here with only auth and vcenter info changed. 
> thanks for any help!
>
> http://docs.ansible.com/vsphere_guest_module.html
>
> $ cat vmtest.yml
>
> # Create a new VM on an ESX server
> # Returns changed = False when the VM already exists
> # Returns changed = True and a adds ansible_facts from the new VM
> # State will set the power status of a guest upon creation. Use powered_on to 
> create and boot.
> # Options ['state', 'vm_extra_config', 'vm_disk', 'vm_nic', 'vm_hardware', 
> 'esxi'] are required together
>
> - vsphere_guest:
>     vcenter_hostname: myvcenter
>
> .
>
> .
>
> .
>
>

-- 
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/69aea09e-fe9f-481e-82e9-1c0501243404%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to