I try to deploy VMs into a Cluster DRS using vsphere_guest but it seems we have to specify an ESX's name even if we defined a Cluster. May we have a solution for this?
Here is my code:
`- hosts: 127.0.0.1
connection: local
gather_facts: false
vars:
vcenter_values:
I try to deploy VMs into a Cluster DRS using vsphere_guest but it seems we have to specify an ESX's name even if we defined a Cluster. May we have a solution for this?
Here is my code:
`- hosts: 127.0.0.1 connection: local gather_facts: false vars: vcenter_values:
size_gb: "{{ item.0.vm.size }}"
type: "{{ item.0.vm.disk_type }}"
datastore: "{{ item.0.vm.datastore }}"
vm_nic:
nic4:
type: vmxnet3
network: VM Network
network_type: standard
nic1: type: "{{ item.0.vm.nic_type }}" network: "{{ item.0.vm.nic_name }}" network_type: "{{ item.0.vm.nic_tech }}" nic2: type: "{{ item.0.vm.nic_type }}" network: "{{ item.0.vm.nic_name }}" network_type: "{{ item.0.vm.nic_tech }}" nic3: type: "{{ item.0.vm.nic_type }}" network: "{{ item.0.vm.nic_name }}" network_type: "{{ item.0.vm.nic_tech }}" vm_hardware: memory_mb: "{{ item.0.vm.mem }}" num_cpus: "{{ item.0.vm.vcpu }}" osid: vmkernel6Guest
scsi: lsilogic
scsi: "{{ item.0.vm.scsi }}" vm_cdrom: type: "iso" iso_path: "{{ item.0.vm.iso_path }}" cluster: "{{ item.0.vm.cluster }}"
esxi:
datacenter: Lyon
hostname: esxi1.lyon.dawan.fr
resource_pool: "{{ item.0.vm.rp }}" with_subelements: