Hello. I am unable to deploy from template when the datacenter is inside a folder. I am getting the error “msg”: “No folder matched the path: /Chicago Data Center/datacenter1/app”
i.e. /Folder/datacenter/folder
/Chicago Data Center/datacenter1/app
The path to the app folder via govc looks like this: /Chicago Data Center/datacenter1/vm/app
The under VMs and Templates look like this.
- vCenter
- Chicago Data Center/
- datacenter
- app
I have tried both ansible 2.3 and 2.4.
tasks:
- name: create the VM
 vmware_guest:
 hostname: “{{ vsphere_hostname }}”
 username: “{{ username | quote }}”
 password: “{{ esxi_pass }}”
 validate_certs: no
 esxi_hostname: “{{ esxi_hostname }}”
 datacenter: “{{ esxi_datacenter }}”
 name: “{{ item.key }}”
 state: poweredon
 guest_id: “{{ item.value.guest_id }}”
 template: “{{ item.value.template }}”
 disk:
- size_gb: 20
 type: thin
 datastore: “{{ esxi_datastore }}”
 hardware:
 memory_mb: “{{ item.value.memory_mb }}”
 num_cpus: “{{ item.value.num_cpus }}”
 scsi: lsilogic
 networks:
- name: “{{ item.value.networks_name }}”
 ip: “{{ item.value.ip }}”
 netmask: “{{ item.value.netmask }}”
 gateway: “{{ item.value.gateway }}”
With out the datacenter being nested I can deploy VMs with and without specifying the folder. Any help would be appreciated.