summaryrefslogtreecommitdiff
path: root/inventory/host_vars/ele-gwhetzner.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-06-22 02:37:11 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-06-22 02:37:11 +0200
commit5a35c210ddb64998586b69b921e8d721395f09d5 (patch)
tree9a65e26f147c59ab379e1cd23a1baf60ac5d5264 /inventory/host_vars/ele-gwhetzner.yml
parentMerge branch 'topic/kubernetes-network-plugins' (diff)
parentconverted other physical machines to new network config (diff)
Merge branch 'topic/network-interfaces-variables-refactoring'
Diffstat (limited to 'inventory/host_vars/ele-gwhetzner.yml')
-rw-r--r--inventory/host_vars/ele-gwhetzner.yml22
1 files changed, 10 insertions, 12 deletions
diff --git a/inventory/host_vars/ele-gwhetzner.yml b/inventory/host_vars/ele-gwhetzner.yml
index 2519ab94..d349ddcc 100644
--- a/inventory/host_vars/ele-gwhetzner.yml
+++ b/inventory/host_vars/ele-gwhetzner.yml
@@ -1,9 +1,6 @@
---
-_vm_host_: sk-2019vm
-
install:
vm:
- host: "{{ _vm_host_ }}"
mem: 1024
numcpu: 1
autostart: False
@@ -19,16 +16,17 @@ install:
name: primary0
network:
- nameservers: "{{ hostvars[_vm_host_].vm_host.network.dns }}"
+ nameservers: "{{ vm_host.network.dns }}"
domain: "{{ host_domain }}"
systemd_link:
interfaces: "{{ install.interfaces }}"
- primary:
- interface: primary0
- ip: "{{ hostvars[_vm_host_].vm_host.network.bridges.public.prefix | ipaddr(hostvars[_vm_host_].vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address') }}"
- 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] }}"
+ primary: &_network_primary_
+ name: primary0
+ address: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[inventory_hostname]) | ipaddr('address/prefix') }}"
+ gateway: "{{ vm_host.network.bridges.public.prefix | ipaddr(vm_host.network.bridges.public.offsets[vm_host.name]) | ipaddr('address') }}"
+ overlay: "{{ (vm_host.network.bridges.public.overlay.prefix | ipaddr(vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}"
+ interfaces:
+ - *_network_primary_
external_ip: "{{ network.primary.overlay }}"
@@ -48,7 +46,7 @@ wireguard_gateway_tunnels:
addresses:
- 192.168.254.1/30
ip_snat:
- interface: "{{ network.primary.interface }}"
+ interface: "{{ network.primary.name }}"
to: "{{ network.primary.overlay }}"
port_forwardings:
- dest: "{{ network.primary.overlay }}"
@@ -67,7 +65,7 @@ wireguard_gateway_tunnels:
addresses:
- 192.168.254.5/30
ip_snat:
- interface: "{{ network.primary.interface }}"
+ interface: "{{ network.primary.name }}"
to: "{{ network.primary.overlay }}"
port_forwardings:
- dest: "{{ network.primary.overlay }}"