#!/bin/bash # {{ansible_managed}} [[ $1 = stop ]] && exit 0 echo rc.inet1 PATH is $PATH ifconfig lo up brctl addbr xenbr0 {% for front_nic in front_nics %} brctl addif xenbr0 {{front_nic}} {% endfor %} ifconfig xenbr0 {{cidr}} up {% for front_nic in front_nics %} ifconfig {{front_nic}} up {% endfor %} route add default gw {{gw}} brctl addbr br0 {% for cluster_nic in cluster_nics %} brctl addif br0 {{cluster_nic}} {% endfor %} ifconfig br0 10.3.3.{{node_id}}/24 up ifconfig eth1 up brctl addbr guestbr0 {% if not martinez %} # todo - id2ip ifconfig guestbr0 {{guest_prefix}}.0.{{node_id}}/16 up {% elif martinez %} # convergent gateway ifconfig guestbr0 {{guest_prefix}}.255.254/16 up {% else %} error: define martinez {{ 0/0 }} {% endif %} # self-verbose sysctl -w net.ipv4.ip_forward=1 echo -n loading nftables ... nft -f /etc/nftables.conf && echo done || echo FAIL