dataset/seed/host-systemd-machined/templates/network-script

19 lines
514 B
Text
Raw Normal View History

2023-06-23 08:12:05 +02:00
#!/bin/bash
2022-03-08 19:42:28 +01:00
2023-02-14 14:24:16 +01:00
set -e
2023-06-23 08:12:05 +02:00
{% set name = rougail_variable|normalize_family %}
{% set container = machined['machine_' + name] %}
{% set zones = container['zones_' + name] %}
{% if zones| length > 1 %}
{% for zone in zones %}
{% set idx = loop.index - 1 %}
{% if idx %}
{% set intname = "vc-" + idx|string + rougail_variable %}
echo "configuration de {{ intname }}"
/usr/sbin/ip link set dev {{ intname[:15] }} master {{ zone }}
/usr/sbin/ip link set dev {{ intname[:15] }} up
{% endif %}
{% endfor %}
{% endif %}
exit 0