diff --git a/Makefile b/Makefile index bbbda49..045f533 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: setup wg k3s +install: setup wg k3s setup: ansible-playbook -i "inventory/hosts.yml" "init.yml" @@ -9,3 +9,6 @@ wg: k3s: ansible-playbook -i "inventory/hosts.yml" "k3s-ansible/site.yml" +uninstall: + ansible-playbook -i "inventory/hosts.yml" "k3s-ansible/reset.yml" + diff --git a/README.md b/README.md index 18ff031..02665ed 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,8 @@ Running the configuration for a node with inventory ``` ansible-playbook init.yml -i inventory --limit virgin ``` + +Initiate the cluster from scratch +``` +make all +``` diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index 05b780e..c15c554 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -3,7 +3,7 @@ k3s_version: v1.23.6+k3s1 # ansible_user: debian systemd_dir: /etc/systemd/system master_ip: "{{ hostvars[groups['master'][0]]['wireguard_ip'] | default(groups['master'][0]) }}" -extra_server_args: "--no-deploy traefik --advertise-address {{hostvars[inventory_hostname]['wireguard_ip']}} --flannel-iface wg0 --tls-san {{ ansible_host }}" +extra_server_args: "--no-deploy traefik --advertise-address {{hostvars[inventory_hostname]['wireguard_ip']}} --flannel-iface wg0 --tls-san {{ ansible_host }} --disable servicelb" extra_agent_args: "--flannel-iface wg0 --node-external-ip {{hostvars[inventory_hostname]['ansible_default_ipv4']['address']}}" cluster_vip: "10.20.0.2"