This commit is contained in:
Tanguy Herbron 2023-04-11 10:24:26 +02:00
commit a802758168
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: 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: 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: 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: uninstall:
ansible-playbook -i "inventory/hosts.yml" "k3s-ansible/reset.yml" ansible-playbook -i "inventory/hosts.yml" "k3s-ansible/reset.yml"

View File

@ -1,4 +1,13 @@
--- ---
- hosts: all - hosts: all
roles: tasks:
- node-configuration - 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