I'm currently trying to figure out how best to approach a situation where a vCenter has one or more Datacenters with the same name but in different Folder Locations. Because of this I'm unable to deploy to the correct Cluster: Currently Ansible picks up the first Datacenter it sees and returns an Error if the Cluster isn't part of that particular DataCenter.
cluster < Name > not found in DC
Code
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
datacenter: "{{ datacenter }}"
cluster: "{{ cluster }}"
name: "{{ vm_name }}"
template: "{{ template }}"
networks:
- name: "{{ network }}"
ip: "{{ ip }}"
netmask: "{{ net_mask }}"
gateway: "{{ gateway }}"
domain: my_domain
dns_servers:
type: dhcp