build(makefile): improve stacked execution with custom environments, for better summary

This commit is contained in:
Tanguy Herbron 2023-03-06 15:03:09 +01:00
parent ff5e321b1a
commit 2626e7d15a
2 changed files with 16 additions and 6 deletions

View File

@ -1,13 +1,14 @@
install: setup wg k3s
install:
ansible-playbook -i "inventory/hosts.yml" "init.yml" --extra-vars "enable_setup=true enable_wireguard=true enable_k3s=true"
setup:
ansible-playbook -i "inventory/hosts.yml" "init.yml"
ansible-playbook -i "inventory/hosts.yml" "init.yml" --extra-vars "enable_setup=true enable_wireguard=false enable_k3s=false"
wg:
ansible-playbook -i "inventory/hosts.yml" "wireguard/wireguard.yml"
ansible-playbook -i "inventory/hosts.yml" "init.yml" --extra-vars "enable_setup=false enable_wireguard=true enable_k3s=false"
k3s:
ansible-playbook -i "inventory/hosts.yml" "k3s-ansible/site.yml"
ansible-playbook -i "inventory/hosts.yml" "init.yml" --extra-vars "enable_setup=false enable_wireguard=false enable_k3s=true"
uninstall:
ansible-playbook -i "inventory/hosts.yml" "k3s-ansible/reset.yml"

View File

@ -1,4 +1,13 @@
---
- hosts: all
roles:
- node-configuration
tasks:
- name: Start basic node configuration
include_role:
name: node-configuration
when: enable_setup|bool == true
- name: Configure wireguard
ansible.builtin.import_playbook: wireguard/wireguard.yml
when: enable_wireguard|bool == true
- name: Configure k3s
ansible.builtin.import_playbook: wireguard/wireguard.yml
when: enable_k3s|bool == true