summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-06-21 20:21:14 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-06-21 20:21:14 +0200
commit7a0c203380731eaaae03fca8de71cdf9094b0120 (patch)
treeb9d9a1fd34dce7d259c6a1133b74c0cc36c1df8f /roles
parentfurther improved network config (diff)
address vs prefix
Diffstat (limited to 'roles')
-rw-r--r--roles/elevate/media/templates/firewall/elevate-festival.sh.j24
-rw-r--r--roles/elevate/media/templates/firewall/lan-only.sh.j24
-rw-r--r--roles/elevate/media/templates/firewall/r3-with-lan.sh.j24
-rw-r--r--roles/elevate/media/templates/netplan/elevate-festival.yaml.j22
-rw-r--r--roles/elevate/media/templates/netplan/lan-only.yaml.j22
-rw-r--r--roles/elevate/media/templates/netplan/r3-with-lan.yaml.j22
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j24
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j24
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j24
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j24
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j24
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j24
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j24
-rw-r--r--roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j24
-rw-r--r--roles/installer/openbsd/autoinstall/templates/auto_install.conf.j24
-rw-r--r--roles/vm/network/templates/interfaces.j28
16 files changed, 31 insertions, 31 deletions
diff --git a/roles/elevate/media/templates/firewall/elevate-festival.sh.j2 b/roles/elevate/media/templates/firewall/elevate-festival.sh.j2
index 8cb56cd6..c9d6cb88 100644
--- a/roles/elevate/media/templates/firewall/elevate-festival.sh.j2
+++ b/roles/elevate/media/templates/firewall/elevate-festival.sh.j2
@@ -16,8 +16,8 @@ FILTER6="$IP6TABLES -t filter"
MANGLE6="$IP6TABLES -t mangle"
LAN_IF="{{ network.primary.name }}"
-LAN_IPADDR="{{ network.primary.prefix | ipaddr('address') }}"
-LAN_NETMASK="{{ network.primary.prefix | ipaddr('netmask') }}"
+LAN_IPADDR="{{ network.primary.address | ipaddr('address') }}"
+LAN_NETMASK="{{ network.primary.address | ipaddr('netmask') }}"
EXT_IF="wg-gwhetzner"
EXT_IPADDR="192.168.254.2"
diff --git a/roles/elevate/media/templates/firewall/lan-only.sh.j2 b/roles/elevate/media/templates/firewall/lan-only.sh.j2
index 0ec06ba2..85f0cde4 100644
--- a/roles/elevate/media/templates/firewall/lan-only.sh.j2
+++ b/roles/elevate/media/templates/firewall/lan-only.sh.j2
@@ -16,8 +16,8 @@ FILTER6="$IP6TABLES -t filter"
MANGLE6="$IP6TABLES -t mangle"
LAN_IF="{{ network.primary.name }}"
-LAN_IPADDR="{{ network.primary.prefix | ipaddr('address') }}"
-LAN_NETMASK="{{ network.primary.prefix | ipaddr('netmask') }}"
+LAN_IPADDR="{{ network.primary.address | ipaddr('address') }}"
+LAN_NETMASK="{{ network.primary.address | ipaddr('netmask') }}"
#########################
diff --git a/roles/elevate/media/templates/firewall/r3-with-lan.sh.j2 b/roles/elevate/media/templates/firewall/r3-with-lan.sh.j2
index c7fe5f6b..fb2d45a9 100644
--- a/roles/elevate/media/templates/firewall/r3-with-lan.sh.j2
+++ b/roles/elevate/media/templates/firewall/r3-with-lan.sh.j2
@@ -16,8 +16,8 @@ FILTER6="$IP6TABLES -t filter"
MANGLE6="$IP6TABLES -t mangle"
LAN_IF="{{ network.primary.name }}"
-LAN_IPADDR="{{ network.primary.prefix | ipaddr('address') }}"
-LAN_NETMASK="{{ network.primary.prefix | ipaddr('netmask') }}"
+LAN_IPADDR="{{ network.primary.address | ipaddr('address') }}"
+LAN_NETMASK="{{ network.primary.address | ipaddr('netmask') }}"
EXT_IF="{{ network.primary.name }}.{{ network_zones.ccinet.vlan }}"
EXT_IPADDR="89.106.211.61"
diff --git a/roles/elevate/media/templates/netplan/elevate-festival.yaml.j2 b/roles/elevate/media/templates/netplan/elevate-festival.yaml.j2
index ef227fed..9ca54c55 100644
--- a/roles/elevate/media/templates/netplan/elevate-festival.yaml.j2
+++ b/roles/elevate/media/templates/netplan/elevate-festival.yaml.j2
@@ -3,7 +3,7 @@ network:
renderer: networkd
ethernets:
{{ network.primary.name }}:
- addresses: [ {{ network.primary.prefix }} ]
+ addresses: [ {{ network.primary.address }} ]
gateway4: {{ network.primary.gateway }}
accept-ra: false
nameservers:
diff --git a/roles/elevate/media/templates/netplan/lan-only.yaml.j2 b/roles/elevate/media/templates/netplan/lan-only.yaml.j2
index ef227fed..9ca54c55 100644
--- a/roles/elevate/media/templates/netplan/lan-only.yaml.j2
+++ b/roles/elevate/media/templates/netplan/lan-only.yaml.j2
@@ -3,7 +3,7 @@ network:
renderer: networkd
ethernets:
{{ network.primary.name }}:
- addresses: [ {{ network.primary.prefix }} ]
+ addresses: [ {{ network.primary.address }} ]
gateway4: {{ network.primary.gateway }}
accept-ra: false
nameservers:
diff --git a/roles/elevate/media/templates/netplan/r3-with-lan.yaml.j2 b/roles/elevate/media/templates/netplan/r3-with-lan.yaml.j2
index 296233f4..3dbfeba6 100644
--- a/roles/elevate/media/templates/netplan/r3-with-lan.yaml.j2
+++ b/roles/elevate/media/templates/netplan/r3-with-lan.yaml.j2
@@ -3,7 +3,7 @@ network:
renderer: networkd
ethernets:
{{ network.primary.name }}:
- addresses: [ {{ network.primary.prefix }} ]
+ addresses: [ {{ network.primary.address }} ]
accept-ra: false
vlans:
{{ network.primary.name }}.{{ network_zones.ccinet.vlan }}:
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
index ca4cc37e..0f669006 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-buster-with-raid.cfg.j2
@@ -16,8 +16,8 @@ d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
index 5b7e12e9..770eb146 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
@@ -16,8 +16,8 @@ d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
index f4448dbd..cf20410a 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
@@ -16,8 +16,8 @@ d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
index 0896c569..3528d682 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
@@ -16,8 +16,8 @@ d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
index df3b6e90..1b5245a1 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
@@ -23,8 +23,8 @@ d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
index 4b13133c..ca018fd2 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
@@ -23,8 +23,8 @@ d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
index d84ab9a6..cdb5f966 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
@@ -20,8 +20,8 @@ d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
index 02efc018..155801a4 100644
--- a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
@@ -26,8 +26,8 @@ d-i netcfg/disable_autoconfig boolean false
{% else %}
d-i netcfg/disable_dhcp boolean true
d-i netcfg/disable_autoconfig boolean true
-d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+d-i netcfg/get_ipaddress string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+d-i netcfg/get_netmask string {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
d-i netcfg/get_gateway string {{ hostvars[install_hostname].network_cooked.primary.gateway }}
d-i netcfg/get_nameservers string {{ hostvars[install_hostname].network_cooked.nameservers | join(' ') }}
d-i netcfg/confirm_static boolean true
diff --git a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2 b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
index cf15baff..1e0c8c0c 100644
--- a/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
+++ b/roles/installer/openbsd/autoinstall/templates/auto_install.conf.j2
@@ -4,8 +4,8 @@ Which network interface do you wish to configure = {{ install_interface | defaul
{% if 'install_dhcp' in hostvars[install_hostname] and hostvars[install_hostname].install_dhcp %}
IPv4 address = dhcp
{% else %}
-IPv4 address = {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('address') }}
-Netmask = {{ hostvars[install_hostname].network_cooked.primary.prefix | ipaddr('netmask') }}
+IPv4 address = {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('address') }}
+Netmask = {{ hostvars[install_hostname].network_cooked.primary.address | ipaddr('netmask') }}
Default IPv4 route = {{ hostvars[install_hostname].network_cooked.primary.gateway }}
{% endif %}
DNS domain name = {{ hostvars[install_hostname].network_cooked.domain }}
diff --git a/roles/vm/network/templates/interfaces.j2 b/roles/vm/network/templates/interfaces.j2
index 70edb1dd..d257a98a 100644
--- a/roles/vm/network/templates/interfaces.j2
+++ b/roles/vm/network/templates/interfaces.j2
@@ -13,8 +13,8 @@ auto {{ interface.name }}
iface {{ interface.name }} inet static
pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra
pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf
- address {{ interface.prefix | ipaddr('address') }}
- netmask {{ interface.prefix | ipaddr('netmask') }}
+ address {{ interface.address | ipaddr('address') }}
+ netmask {{ interface.address | ipaddr('netmask') }}
{% if 'overlay' in interface %}
up /bin/ip addr add dev $IFACE {{ interface.overlay }}/32
{% if 'gateway' in interface %}
@@ -27,10 +27,10 @@ iface {{ interface.name }} inet static
gateway {{ interface.gateway }}
{% endif %}
{% endif %}
-{% if 'prefix6' in interface %}
+{% if 'address6' in interface %}
iface {{ interface.name }} inet6 static
- address {{ interface.prefix6 }}
+ address {{ interface.address6 }}
{% if 'gateway6' in interface %}
gateway {{ interface.gateway6 }}
{% endif %}