WIP(headscale): Start migration

This commit is contained in:
Tanguy Herbron 2023-12-05 09:58:25 +01:00
parent 04e3e98cdb
commit 4a74a1a747
3 changed files with 19 additions and 1 deletions

View File

@ -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:

View File

@ -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

View File

@ -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