A VMware vSphere data center is the name given to the collection of physical resources, hosts, storage, and networking which power your cluster:
- name: Create a datacenter vmware_datacenter: hostname: "{{ item.ip }}" username: "{{ item.username }}" password: "{{ item.password }}" datacenter_name: "my_datacenter" state: present with_items: "{{ vsphere_hosts }}"
The previous example adds the hosts listed in vsphere_hosts to the my_datacenter VMware vSphere data center.