feat: Create role

This commit is contained in:
2024-05-13 18:03:03 +02:00
parent ff3a9a8e69
commit 57a8b40b8a
11 changed files with 568 additions and 4 deletions

30
tasks/main.yml Normal file
View File

@@ -0,0 +1,30 @@
---
# tasks file for proxmox
- name: Install prerequisite
ansible.builtin.apt:
name: python3-proxmoxer
update_cache: true
become: true
run_once: true
delegate_to: "{{ proxmox_delegate_to | default(omit) }}"
- name: Import image download tasks
ansible.builtin.import_tasks:
file: get_images.yml
when: proxmox_instance_type == "vm"
- name: Import instance creation tasks
ansible.builtin.import_tasks:
file: vm_template.yml
when: proxmox_instance_type == "vm"
- name: Import instance configuration tasks
ansible.builtin.import_tasks:
file: vm_configuration.yml
when: proxmox_instance_type == "vm"
- name: Import HA configuration tasks
ansible.builtin.import_tasks:
file: ha.yml
when: proxmox_instance_ha | length > 0