diff --git a/Makefile b/Makefile index 89292a6..8920619 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ up: vagrant up; \ else \ echo "No Homelab installation found or missing components, creating..."; \ + sleep 10; \ $(MAKE) install_vb; \ fi @@ -17,13 +18,19 @@ install_vb: @echo "Creating components..." @vagrant up @echo "Installing k3s backbone configuration..." + @make ansible + +wg: + @cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml init.yml --extra-vars "enable_setup=false enable_wireguard=true enable_k3s=false" + +ansible: @cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml init.yml --extra-vars "enable_setup=true enable_wireguard=true enable_k3s=true" @make get_k3s_credentials k3s_reset: @echo "Resetting k3s configuration..." @cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml k3s-ansible/reset.yml - @cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ../inventory/lab.yml -i ../inventory/outsider.yml init.yml --extra-vars "enable_setup=true enable_wireguard=true enable_k3s=true" + @make ansible @make get_k3s_credentials destroy: diff --git a/inventory/lab.yml b/inventory/lab.yml index 8f64917..7924271 100644 --- a/inventory/lab.yml +++ b/inventory/lab.yml @@ -8,6 +8,8 @@ all: k3s_label: - type=worker - size=wide + headscale: + network: beta hb-wide-2: ansible_host: 192.168.56.102 is_nas: false @@ -66,6 +68,10 @@ all: children: master: node: + headscale_client: + hosts: + hb-wide-1: + hb-wide-2: vars: ansible_ssh_private_key_file: ~/.ssh/creator ansible_user: creator diff --git a/inventory/outsider.yml b/inventory/outsider.yml index d0ca127..c6ce9aa 100644 --- a/inventory/outsider.yml +++ b/inventory/outsider.yml @@ -7,6 +7,8 @@ all: wireguard_ip: 10.20.0.254 k3s_label: - type=outbound + headscale: + network: beta children: node: hosts: @@ -20,6 +22,9 @@ all: k3s_cluster: children: node: + headscale_server: + hosts: + outsider: vars: ansible_ssh_private_key_file: ~/.ssh/creator ansible_user: creator