fix: Local cluster configuration

This commit is contained in:
Tanguy Herbron 2024-02-28 17:22:17 +01:00
parent a8cb37e19c
commit c9f162325a
3 changed files with 7 additions and 17 deletions

View File

@ -46,7 +46,7 @@ ansible:
if [ x"${NAS}" != "x" ]; then \ if [ x"${NAS}" != "x" ]; then \
INV_LIST="$${INV_LIST} -i ../inventory/nas.yml"; \ INV_LIST="$${INV_LIST} -i ../inventory/nas.yml"; \
fi; \ fi; \
cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook $${INV_LIST} init.yml --extra-vars 'enable_setup=true enable_wireguard=true enable_k3s=true' cd ansible && ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook $${INV_LIST} init.yml --extra-vars 'enable_setup=true enable_wireguard=false enable_k3s=true'
@make get_k3s_credentials @make get_k3s_credentials
k3s_reset: k3s_reset:

@ -1 +1 @@
Subproject commit 920407620d3554785d9b576d977b80b97a8fc3c4 Subproject commit a16d3d077350f5d076c62c1a1afd19e87961bdd2

View File

@ -41,24 +41,14 @@ all:
headscale: headscale:
network: beta network: beta
children: children:
master: server:
hosts: hosts:
hb-wide-1: hb-wide-1:
node: agent:
hosts: hosts:
hb-wide-2: hb-wide-2:
hb-slim-1: hb-slim-1:
hb-slim-2: hb-slim-2:
etcd_cluster:
hosts:
hb-wide-1:
hb-wide-2:
hb-slim-1:
hb-slim-2:
k3s_cluster:
children:
server:
agent:
headscale_client: headscale_client:
hosts: hosts:
hb-wide-1: hb-wide-1:
@ -72,6 +62,6 @@ all:
ansible_ssh_port: 22 ansible_ssh_port: 22
k3s_version: v1.28.5+k3s1 k3s_version: v1.28.5+k3s1
token: "aberation" # Use ansible vault if you want to keep it secret token: "aberation" # Use ansible vault if you want to keep it secret
api_endpoint: "{{ hostvars[groups['server'][0]]['ansible_tailscale0'].ipv4.address | default(groups['server'][0]) }}" api_endpoint: "{{ hostvars[groups['server'][0]]['ansible_eth1'].ipv4.address | default(groups['server'][0]) }}"
extra_server_args: "--disable traefik --advertise-address {{hostvars[inventory_hostname]['ansible_tailscale0'].ipv4.address}} --flannel-iface tailscale0 --tls-san {{ ansible_host }} --disable servicelb {{ ['--node-label']|product(hostvars[inventory_hostname]['k3s_label'])|map('join', ' ')|join(' ') }}" extra_server_args: "--disable traefik --advertise-address {{hostvars[inventory_hostname]['ansible_eth1'].ipv4.address}} --tls-san {{ ansible_host }} --disable servicelb {{ ['--node-label']|product(hostvars[inventory_hostname]['k3s_label'])|map('join', ' ')|join(' ') }}"
extra_agent_args: "--flannel-iface tailscale0 --node-external-ip {{hostvars[inventory_hostname]['ansible_default_ipv4']['address']}} {{ ['--node-label']|product(hostvars[inventory_hostname]['k3s_label'])|map('join', ' ')|join(' ') }}" extra_agent_args: "--node-external-ip {{hostvars[inventory_hostname]['ansible_default_ipv4']['address']}} {{ ['--node-label']|product(hostvars[inventory_hostname]['k3s_label'])|map('join', ' ')|join(' ') }}"