refactor: yml -> yaml
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
8
roles/proxmox/tasks/00_setup_machines.yaml
Normal file
8
roles/proxmox/tasks/00_setup_machines.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Prepare Localhost
|
||||
ansible.builtin.include_tasks: ./01_setup_localhost.yaml
|
||||
when: is_localhost
|
||||
|
||||
- name: Prepare Localhost
|
||||
ansible.builtin.include_tasks: ./05_setup_node.yaml
|
||||
when: is_proxmox_node
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- name: Prepare Localhost
|
||||
ansible.builtin.include_tasks: ./01_setup_localhost.yml
|
||||
when: is_localhost
|
||||
|
||||
- name: Prepare Localhost
|
||||
ansible.builtin.include_tasks: ./05_setup_node.yml
|
||||
when: is_proxmox_node
|
||||
@@ -7,4 +7,4 @@
|
||||
loop: "{{ proxmox_node_dependencies }}"
|
||||
|
||||
- name: Ensure Harware Acceleration on node
|
||||
ansible.builtin.include_tasks: 06_hardware_acceleration.yml
|
||||
ansible.builtin.include_tasks: 06_hardware_acceleration.yaml
|
||||
@@ -6,7 +6,7 @@
|
||||
mode: "0600"
|
||||
|
||||
- name: Update Vault data
|
||||
ansible.builtin.include_tasks: 15_create_secret.yml
|
||||
ansible.builtin.include_tasks: 15_create_secret.yaml
|
||||
loop: "{{ vms | map(attribute='name') }}"
|
||||
loop_control:
|
||||
loop_var: "vm_name"
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Download Cloud Init Isos
|
||||
ansible.builtin.include_tasks: 42_download_isos.yml
|
||||
ansible.builtin.include_tasks: 42_download_isos.yaml
|
||||
loop: "{{ proxmox_cloud_init_images | dict2items | map(attribute='value') }}"
|
||||
loop_control:
|
||||
loop_var: distro
|
||||
@@ -5,13 +5,13 @@
|
||||
name: vm_secrets
|
||||
|
||||
# - name: Destroy vms (Only during rapid testing)
|
||||
# ansible.builtin.include_tasks: 54_destroy_vm.yml
|
||||
# ansible.builtin.include_tasks: 54_destroy_vm.yaml
|
||||
# loop: "{{ vms }}"
|
||||
# loop_control:
|
||||
# loop_var: "vm"
|
||||
|
||||
- name: Create vms
|
||||
ansible.builtin.include_tasks: 55_create_vm.yml
|
||||
ansible.builtin.include_tasks: 55_create_vm.yaml
|
||||
loop: "{{ vms }}"
|
||||
loop_control:
|
||||
loop_var: "vm"
|
||||
@@ -27,5 +27,5 @@
|
||||
register: proxmox_deploy_info
|
||||
|
||||
- name: Provision created VM
|
||||
ansible.builtin.include_tasks: 56_provision_new_vm.yml
|
||||
ansible.builtin.include_tasks: 56_provision_new_vm.yaml
|
||||
when: proxmox_deploy_info.changed
|
||||
@@ -35,7 +35,7 @@
|
||||
state: started
|
||||
|
||||
- name: Retry stopping VM
|
||||
ansible.builtin.include_tasks: ./57_stop_and_verify_vm.yml
|
||||
ansible.builtin.include_tasks: ./57_stop_and_verify_vm.yaml
|
||||
|
||||
- name: Pause for 5 seconds for api
|
||||
ansible.builtin.pause:
|
||||
@@ -36,4 +36,4 @@
|
||||
seconds: 5
|
||||
|
||||
- name: "Failed to stop VM - Retrying..."
|
||||
include_tasks: ./57_stop_and_verify_vm.yml
|
||||
include_tasks: ./57_stop_and_verify_vm.yaml
|
||||
@@ -5,7 +5,7 @@
|
||||
name: vm_secrets
|
||||
|
||||
- name: Create vms
|
||||
ansible.builtin.include_tasks: 65_create_container.yml
|
||||
ansible.builtin.include_tasks: 65_create_container.yaml
|
||||
loop: "{{ lxcs }}"
|
||||
loop_control:
|
||||
loop_var: "container"
|
||||
19
roles/proxmox/tasks/main.yaml
Normal file
19
roles/proxmox/tasks/main.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Prepare Machines
|
||||
ansible.builtin.include_tasks: 00_setup_machines.yaml
|
||||
|
||||
- name: Create VM vault
|
||||
ansible.builtin.include_tasks: 10_create_secrets.yaml
|
||||
when: is_localhost
|
||||
|
||||
- name: Prime node for VM
|
||||
ansible.builtin.include_tasks: 40_prepare_vm_creation.yaml
|
||||
when: is_proxmox_node
|
||||
|
||||
- name: Create VMs
|
||||
ansible.builtin.include_tasks: 50_create_vms.yaml
|
||||
when: is_localhost
|
||||
|
||||
- name: Create LXC containers
|
||||
ansible.builtin.include_tasks: 60_create_containers.yaml
|
||||
when: is_localhost
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
- name: Prepare Machines
|
||||
ansible.builtin.include_tasks: 00_setup_machines.yml
|
||||
|
||||
- name: Create VM vault
|
||||
ansible.builtin.include_tasks: 10_create_secrets.yml
|
||||
when: is_localhost
|
||||
|
||||
- name: Prime node for VM
|
||||
ansible.builtin.include_tasks: 40_prepare_vm_creation.yml
|
||||
when: is_proxmox_node
|
||||
|
||||
- name: Create VMs
|
||||
ansible.builtin.include_tasks: 50_create_vms.yml
|
||||
when: is_localhost
|
||||
|
||||
- name: Create LXC containers
|
||||
ansible.builtin.include_tasks: 60_create_containers.yml
|
||||
when: is_localhost
|
||||
Reference in New Issue
Block a user