You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
890 B
YAML
32 lines
890 B
YAML
---
|
|
# 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.import_tasks:
|
|
file: proxmox.yml
|
|
|
|
- name: Include tasks to connect to the new VM
|
|
ansible.builtin.import_tasks:
|
|
file: connect.yml
|
|
when: create_vm_proxmox_connect_to_vm | bool
|
|
|
|
...
|