--- # tasks file for Create-VM - name: Check that all required variables are declared ansible.builtin.fail: msg: "{{ item }} is undefined" when: - vars[item] is undefined loop: "{{ create_vm_proxmox_required_vars }}" - name: Check that required variables for proxmox are defined ansible.builtin.fail: msg: "{{ item }} is undefined" loop: "{{ create_vm_proxmox_required_vars }}" when: - vars[item] is undefined - name: Check that required variables for Proxmox cloud-init are defined ansible.builtin.fail: msg: "{{ item }} is undefined" loop: "{{ create_vm_proxmox_required_vars_cloudinit }}" when: - vars[item] is undefined - name: Include Proxmox tasks ansible.builtin.include_tasks: proxmox.yml - name: Include tasks to connect to the new VM ansible.builtin.include_tasks: file: connect.yml when: - create_vm_proxmox_connect_to_vm | bool ...