You've already forked role_proxmox
refacto: Partial rewrite to manage nodes
This commit is contained in:
@@ -1,31 +1,26 @@
|
||||
---
|
||||
# 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"
|
||||
# Node
|
||||
- name: Import Proxmox VE configuration tasks
|
||||
ansible.builtin.include_tasks:
|
||||
file: node_configuration.yml
|
||||
when: proxmox_instance_type | length == 0
|
||||
|
||||
# Instance: vm
|
||||
- name: Import instance creation tasks
|
||||
ansible.builtin.import_tasks:
|
||||
file: vm_template.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: instance_vm_template.yml
|
||||
when: proxmox_instance_type == "vm"
|
||||
|
||||
- name: Import instance configuration tasks
|
||||
ansible.builtin.import_tasks:
|
||||
file: vm_configuration.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: instance_vm_configuration.yml
|
||||
when: proxmox_instance_type == "vm"
|
||||
|
||||
# Disabled until the community.proxmox module is compatible with Proxmox VE 9
|
||||
# - name: Import HA configuration tasks
|
||||
# ansible.builtin.import_tasks:
|
||||
# file: ha.yml
|
||||
# when: proxmox_instance_ha | length > 0
|
||||
- name: Import HA configuration tasks
|
||||
ansible.builtin.include_tasks:
|
||||
file: instance_vm_ha.yml
|
||||
when:
|
||||
- proxmox_instance_type == "vm"
|
||||
- proxmox_instance_ha | length > 0
|
||||
|
||||
Reference in New Issue
Block a user