From d9687ede9928eb8ec6a7b3ff238f7b9fd319a670 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 23 Aug 2020 01:56:46 +0200 Subject: revamp installer playbooks and add ch-apps vm --- roles/vm/guest/network/templates/interfaces/multihomed-base.j2 | 4 ++-- roles/vm/guest/network/templates/interfaces/overlay.j2 | 4 ++-- roles/vm/guest/network/templates/interfaces/simple.j2 | 4 ++-- roles/vm/guest/network/templates/interfaces/simple6.j2 | 4 ++-- roles/vm/host/network/templates/interfaces/simple.j2 | 4 ++-- roles/vm/host/network/templates/interfaces/simple6.j2 | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'roles/vm') diff --git a/roles/vm/guest/network/templates/interfaces/multihomed-base.j2 b/roles/vm/guest/network/templates/interfaces/multihomed-base.j2 index db16d15f..3420dcf0 100644 --- a/roles/vm/guest/network/templates/interfaces/multihomed-base.j2 +++ b/roles/vm/guest/network/templates/interfaces/multihomed-base.j2 @@ -1,7 +1,7 @@ address {{ interface.address | ipaddr('address') }} netmask {{ interface.address | ipaddr('netmask') }} {% for route in interface.static_routes | default([]) %} - up /bin/ip route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{% if 'table' in route %} table {{ route.table }}{% endif %} + up /bin/ip route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{% if 'table' in route %} table {{ route.table }}{% endif %}{{ '' }} {% endfor %} {% if 'gateway' in interface %} up /bin/ip route add default via {{ interface.gateway }} table default @@ -14,5 +14,5 @@ down /bin/ip route del default via {{ interface.gateway }} table default {% endif %} {% for route in interface.static_routes | default([]) | reverse %} - down /bin/ip route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{% if 'table' in route %} table {{ route.table }}{% endif %} + down /bin/ip route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{% if 'table' in route %} table {{ route.table }}{% endif %}{{ '' }} {% endfor %} diff --git a/roles/vm/guest/network/templates/interfaces/overlay.j2 b/roles/vm/guest/network/templates/interfaces/overlay.j2 index 0524c5df..b2ef11a9 100644 --- a/roles/vm/guest/network/templates/interfaces/overlay.j2 +++ b/roles/vm/guest/network/templates/interfaces/overlay.j2 @@ -2,13 +2,13 @@ netmask {{ interface.address | ipaddr('netmask') }} up /bin/ip addr add dev $IFACE {{ interface.overlay }}/32 {% for route in interface.static_routes | default([]) %} - up /bin/ip route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + up /bin/ip route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} {% if 'gateway' in interface %} up /bin/ip route add default via {{ interface.gateway }} src {{ interface.overlay }} down /bin/ip route del default via {{ interface.gateway }} src {{ interface.overlay }} {% endif %} {% for route in interface.static_routes | default([]) | reverse %} - down /bin/ip route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + down /bin/ip route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} down /bin/ip addr del dev $IFACE {{ interface.overlay }}/32 diff --git a/roles/vm/guest/network/templates/interfaces/simple.j2 b/roles/vm/guest/network/templates/interfaces/simple.j2 index c5b7dadc..8d1bb83e 100644 --- a/roles/vm/guest/network/templates/interfaces/simple.j2 +++ b/roles/vm/guest/network/templates/interfaces/simple.j2 @@ -4,8 +4,8 @@ gateway {{ interface.gateway }} {% endif %} {% for route in interface.static_routes | default([]) %} - up /bin/ip route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + up /bin/ip route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} {% for route in interface.static_routes | default([]) | reverse %} - down /bin/ip route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + down /bin/ip route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} diff --git a/roles/vm/guest/network/templates/interfaces/simple6.j2 b/roles/vm/guest/network/templates/interfaces/simple6.j2 index 37fda07a..aa10070a 100644 --- a/roles/vm/guest/network/templates/interfaces/simple6.j2 +++ b/roles/vm/guest/network/templates/interfaces/simple6.j2 @@ -3,8 +3,8 @@ gateway {{ interface.gateway6 }} {% endif %} {% for route in interface.static_routes6 | default([]) %} - up /bin/ip -6 route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + up /bin/ip -6 route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} {% for route in interface.static_routes6 | default([]) | reverse %} - down /bin/ip -6 route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + down /bin/ip -6 route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} diff --git a/roles/vm/host/network/templates/interfaces/simple.j2 b/roles/vm/host/network/templates/interfaces/simple.j2 index c5b7dadc..8d1bb83e 100644 --- a/roles/vm/host/network/templates/interfaces/simple.j2 +++ b/roles/vm/host/network/templates/interfaces/simple.j2 @@ -4,8 +4,8 @@ gateway {{ interface.gateway }} {% endif %} {% for route in interface.static_routes | default([]) %} - up /bin/ip route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + up /bin/ip route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} {% for route in interface.static_routes | default([]) | reverse %} - down /bin/ip route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + down /bin/ip route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} diff --git a/roles/vm/host/network/templates/interfaces/simple6.j2 b/roles/vm/host/network/templates/interfaces/simple6.j2 index 37fda07a..aa10070a 100644 --- a/roles/vm/host/network/templates/interfaces/simple6.j2 +++ b/roles/vm/host/network/templates/interfaces/simple6.j2 @@ -3,8 +3,8 @@ gateway {{ interface.gateway6 }} {% endif %} {% for route in interface.static_routes6 | default([]) %} - up /bin/ip -6 route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + up /bin/ip -6 route add {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} {% for route in interface.static_routes6 | default([]) | reverse %} - down /bin/ip -6 route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %} + down /bin/ip -6 route del {{ route.destination }} via {{ route.gateway }}{% if 'source' in route %} src {{ route.source }}{% endif %}{{ '' }} {% endfor %} -- cgit v1.2.3