ansible-ffibk/roles/network-ffrl/templates/ffrl.j2
Tobias Hachmer 94cb21daad Add a bunch of new roles
- Update Readme
- Update ansible.cfg
- Add playbook to set up gateways
- Add group variables
2017-09-11 23:21:44 +02:00

16 lines
763 B
Django/Jinja

#
# {{ ansible_managed }}
#
auto {{ item.key }}
iface {{ item.key }} inet static
address {{ item.value.tunnel_ipv4_address }}
netmask {{ item.value.tunnel_ipv4_netmask }}
pre-up /sbin/ip tunnel add $IFACE mode gre local {{ ansible_default_ipv4.address | ipaddr('public') }} remote {{ item.value.public_ipv4_address | ipaddr('public') }} ttl 255
post-up /sbin/ip link set $IFACE mtu 1400
post-up /sbin/ip addr add {{ ffrl_public_ipv4_nat }}/32 dev $IFACE
post-down /sbin/ip tunnel del $IFACE
iface {{ item.key }} inet6 static
address {{ item.value.tunnel_ipv6_network | ipaddr('net') | ipaddr('2') | ipaddr('address') }}
netmask {{ item.value.tunnel_ipv6_netmask }}