fix(Makefile): Run ansible anytime and updatet IPs for tailscale

This commit is contained in:
Tanguy Herbron 2024-01-14 01:36:00 +01:00
parent d504371cc5
commit 7642b97ccb

View File

@ -1,3 +1,5 @@
.PHONY: ansible
up: up:
@echo "Checking for Homelab installation..." @echo "Checking for Homelab installation..."
@vagrant status | grep "not created" > /dev/null; \ @vagrant status | grep "not created" > /dev/null; \
@ -40,7 +42,7 @@ destroy:
get_k3s_credentials: get_k3s_credentials:
@echo "Retrieving k3s credentials locally..." @echo "Retrieving k3s credentials locally..."
@vagrant ssh -c "sudo cat /home/creator/.kube/config" hb-wide-1 > ~/.kube/config-halia @vagrant ssh -c "sudo cat /home/creator/.kube/config" hb-wide-1 > ~/.kube/config-halia
@sed -i 's/10.20.*:/192.168.56.101:/g' ~/.kube/config-halia @sed -i 's/100.64.*:/192.168.56.101:/g' ~/.kube/config-halia
@kube-merge @kube-merge
@kubectl get nodes --context halia @kubectl get nodes --context halia