diff options
-rw-r--r-- | dan/k8s-emc.yml | 1 | ||||
-rw-r--r-- | inventory/host_vars/ch-mimas.yml | 2 | ||||
-rw-r--r-- | inventory/host_vars/emc-master.yml | 1 | ||||
-rw-r--r-- | inventory/host_vars/sk-testvm.yml | 1 | ||||
-rw-r--r-- | inventory/hosts.ini | 4 | ||||
-rw-r--r-- | roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2 | 2 | ||||
-rw-r--r-- | spreadspace/k8s-test.yml | 1 |
7 files changed, 9 insertions, 3 deletions
diff --git a/dan/k8s-emc.yml b/dan/k8s-emc.yml index ddaf3739..b966460b 100644 --- a/dan/k8s-emc.yml +++ b/dan/k8s-emc.yml @@ -20,6 +20,7 @@ tasks: - set_fact: kubernetes_secrets_cooked: "{{ kubernetes_secrets }}" + external_ip_cooked: "{{ external_ip }}" - import_playbook: ../common/kubernetes.yml - import_playbook: ../common/kubernetes-cleanup.yml diff --git a/inventory/host_vars/ch-mimas.yml b/inventory/host_vars/ch-mimas.yml index 79246de5..9a89fe7c 100644 --- a/inventory/host_vars/ch-mimas.yml +++ b/inventory/host_vars/ch-mimas.yml @@ -29,3 +29,5 @@ network: mask: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('netmask') }}" gateway: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('address') }}" overlay: "{{ (hostvars[vm_host].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" + +external_ip: "{{ network.primary.overlay }}" diff --git a/inventory/host_vars/emc-master.yml b/inventory/host_vars/emc-master.yml index 7b1f3210..6c11048a 100644 --- a/inventory/host_vars/emc-master.yml +++ b/inventory/host_vars/emc-master.yml @@ -35,6 +35,7 @@ network: gateway: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('address') }}" overlay: "{{ (hostvars[vm_host].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" +external_ip: "{{ network.primary.overlay }}" docker_lvm: vg: "{{ host_name }}" diff --git a/inventory/host_vars/sk-testvm.yml b/inventory/host_vars/sk-testvm.yml index bad899e5..8ffb8ac7 100644 --- a/inventory/host_vars/sk-testvm.yml +++ b/inventory/host_vars/sk-testvm.yml @@ -30,6 +30,7 @@ network: gateway: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('address') }}" overlay: "{{ (hostvars[vm_host].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}" +external_ip: "{{ network.primary.overlay }}" ### this machine will be used to migrate wolke.chaox.org: # diff --git a/inventory/hosts.ini b/inventory/hosts.ini index b2957b17..26674ac9 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -275,8 +275,8 @@ ele-dolmetsch-raspi ### kubernetes cluster: emc [k8s-emc-encoder] -#ele-dione -#ele-helene +ele-dione +ele-helene [k8s-emc-distribution:children] emc-dist diff --git a/roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2 b/roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2 index 9ca444e8..72b39c3f 100644 --- a/roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2 +++ b/roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2 @@ -14,7 +14,7 @@ After=kubeguard-interfaces.service {% else %} {% set tun_ip = kubernetes.pod_ip_range | ipsubnet(kubernetes.pod_ip_range_size, 0) | ipaddr(kubeguard.node_index[peer]) -%} {% set wg_pubkey = hostvars[peer].kubeguard_wireguard_pubkey.stdout -%} -{% set wg_host = hostvars[peer].external_ip | default(hostvars[peer].ansible_default_ipv4.address) -%} +{% set wg_host = hostvars[peer].external_ip_cooked | default(hostvars[peer].ansible_default_ipv4.address) -%} {% set wg_port = hostvars[peer].kubeguard_wireguard_port -%} {% set wg_allowedips = (tun_ip | ipaddr('address')) + "/32," + pod_net_peer %} {% endif %} diff --git a/spreadspace/k8s-test.yml b/spreadspace/k8s-test.yml index 3cadbb92..9c06dbae 100644 --- a/spreadspace/k8s-test.yml +++ b/spreadspace/k8s-test.yml @@ -20,6 +20,7 @@ tasks: - set_fact: kubernetes_secrets_cooked: "{{ kubernetes_secrets }}" + external_ip_cooked: "{{ external_ip }}" - import_playbook: ../common/kubernetes.yml - import_playbook: ../common/kubernetes-cleanup.yml |