Hi
I am working with ansible and able to create a vm, but i am not able to set up the server hostname
Does the module have a trigger for that?
if not how can i do that?
```
- name: Deploy Ubuntu VM
vmware_guest:
hostname: "{{ vcenter_server }}"
username: "{{ vcenter_user }}"
password: "{{ vcenter_pass }}"
validate_certs: no
name: "{{ item.vmname }}"
state: poweredon
guest_id: ubuntu64Guest
cluster: "{{ item.cluster }}"
datacenter: "{{ item.datacenter }}"
folder: "{{ item.folder}}"
disk:
- size_gb: "{{ item.disk }}"
type: thin
datastore: "{{ item.store }}"
hardware:
memory_mb: "{{ item.ram }}"
num_cpus: "{{ item.cpu }}"
num_cpu_cores_per_socket: "{{ item.cores }}"
scsi: paravirtual
networks:
- name: "{{ item.netname }}"
ip: "{{ ip_address }}"
netmask: "{{ item.netmask }}"
gateway: "{{ item.gateway }}"
dns_servers: "{{ item.dns }}"
start_connected: True
device_type: vmxnet3
cdrom:
type: iso
iso_path: "[{{ item.store }}] {{ DatastoreDir }}/{{ UbuntuNewISO }}"
annotation: |
*** Auto-Deployed by Ansible ***
Username: {{ UbuntuOSUser }}
Password: {{ UbuntuOSPassword }}
```
p.s i am looping so i can create more than one vm
also "name:" give the vm a name but not the hostname
Thanks
Theoneakta