According to 
https://docs.ansible.com/ansible/latest/modules/vmware_guest_module.html 
<https://docs.ansible.com/ansible/latest/modules/vmware_guest_module.html#vmware-guest-module>
 I 
can rename a VM with Ansible by using:

- name: Rename a virtual machine (requires the virtual machine's uuid)
>   vmware_guest:
>     hostname: "{{ vcenter_hostname }}"
>     username: "{{ vcenter_username }}"
>     password: "{{ vcenter_password }}"
>     validate_certs: no
>     uuid: "{{ vm_uuid }}"
>     name: new_name
>     state: present
>   delegate_to: localhost


However, when I try this (Ansible 2.8.2) it complains about a missing 
folder and datacenter parameter.  If those are supplied, the error then says

Unable to find the datastore with given parameters. This could mean, 
new_name is a non-existent virtual machine and module tried to deploy it as 
new virtual machine with no disk. Please specify disks parameter or specify 
template to clone from.

Any thoughts?  Is the documentation wrong?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/97366bc1-f0a8-4190-859f-7d96abc26df3%40googlegroups.com.

Reply via email to