summaryrefslogtreecommitdiff
path: root/dan/ele-calypso.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-07-22 14:31:14 +0200
committerChristian Pointner <equinox@spreadspace.org>2022-07-22 14:31:14 +0200
commit7c45217e1c499dc0e3d35048bf4939235d46153e (patch)
tree8beab605c5ae360c798e42ae0f4640cfbb2c9ee4 /dan/ele-calypso.yml
parentele-calypso: fix mail notifications (diff)
ele-calypso: add temporary workaround for network config
Diffstat (limited to 'dan/ele-calypso.yml')
-rw-r--r--dan/ele-calypso.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/dan/ele-calypso.yml b/dan/ele-calypso.yml
index c7d1e6c4..07dd5a6d 100644
--- a/dan/ele-calypso.yml
+++ b/dan/ele-calypso.yml
@@ -37,3 +37,26 @@
proxy_pass: "http://127.0.0.1:9090"
'/alertmanager/':
proxy_pass: "http://127.0.0.1:9093"
+ post_tasks:
+ ## TODO: move to network/interfaces when this is done
+ - name: install vlan interfaces
+ loop: "{{ network.vlans | dict2items }}"
+ loop_control:
+ label: "{{ item.key }} ({{ item.value | join(',') }})"
+ copy:
+ dest: "/etc/network/interfaces.d/{{ item.key }}"
+ content: |
+ auto {{ item.key }}
+ iface {{ item.key }} inet manual
+ {% for vlan in item.value %}
+ {% set vlan_ifname = item.key + '.' + (vlan | string) %}
+ {% set vlan_iface = (network.interfaces | selectattr('name', 'eq', vlan_ifname)) %}
+
+ auto {{ vlan_ifname }}
+ {% if vlan_iface %}
+ iface {{ vlan_ifname }} inet static
+ address {{ (vlan_iface | first).address }}
+ {% else %}
+ iface {{ vlan_ifname }} inet manual
+ {% endif %}
+ {% endfor %}