15 lines
505 B
Django/Jinja
15 lines
505 B
Django/Jinja
#!/bin/sh
|
|
|
|
{% if ansible_facts['hostname'] == 'hetzner-01' %}
|
|
/sbin/ifconfig $INTERFACE down
|
|
/usr/sbin/ip rule del to {{ tinc_remote_nets[0].net_cidr }} table 5
|
|
|
|
{% elif ansible_facts['hostname'] == 'RaspiBeyerstedt' %}
|
|
/sbin/ifconfig $INTERFACE down
|
|
/bin/ip route del {{ tinc_remote_nets[0].net_cidr }} dev eth0
|
|
|
|
{% elif ansible_facts['os_family'] == 'Darwin' %}
|
|
/sbin/ifconfig $INTERFACE down
|
|
/sbin/route -n delete -net {{ tinc_remote_nets[0].net_cidr }} {{ tinc_remote_nets[0].gateway }}
|
|
|
|
{% endif %}
|