[CODE] add tasks

This commit is contained in:
Jannik Beyerstedt 2019-11-03 16:27:52 +01:00
parent 54cffa0cdc
commit 1900ac0301
11 changed files with 203 additions and 3 deletions

15
templates/tinc-down.j2 Normal file
View file

@ -0,0 +1,15 @@
#!/bin/sh
{% if ansible_hostname == 'hetzner-01' %}
/sbin/ifconfig $INTERFACE down
/usr/sbin/ip rule del to {{ tinc_remote_nets[0].net_cidr }} table 5
{% elif ansible_hostname == 'RaspiBeyerstedt' %}
/sbin/ifconfig $INTERFACE down
/bin/ip route del {{ tinc_remote_nets[0].net_cidr }} dev eth0
{% elif ansible_hostname == 'Magrathea' %}
/sbin/ifconfig $INTERFACE down
/sbin/route -n delete -net {{ tinc_remote_nets[0].net_cidr }} {{ tinc_remote_nets[0].gateway }}
{% endif %}