---
- hosts: localhost
  user: root
  become: false
  vars_files:
    - vars/main.yaml
  tasks:
    - name: "Create resource pool on vCenter"
      vmware_resource_pool:
        hostname: "{{ vcenter_host }}"
        username: "{{ vcenter_username }}"
        password: "{{ vcenter_password }}"
        datacenter: "{{ vcenter_datacenter }}"
        cluster: "{{ vcenter_cluster}}"
        resource_pool: "{{ vcenter_resource_pool }}"
        state: "present"
        validate_certs: False
    - name: "Create folder structure on vCenter"
      vmware_folder:
        hostname: "{{ vcenter_host }}"
        username: "{{ vcenter_username }}"
        password: "{{ vcenter_password }}"
        datacenter: "{{ vcenter_datacenter }}"
        cluster: "{{ vcenter_cluster}}"
        folder: "{{ vcenter_folder }}"
        state: "present"
        validate_certs: False
