[TIDY] Move to ansible_facts dict instead of injected variables

This commit is contained in:
Jannik Beyerstedt 2025-12-20 21:01:23 +01:00
parent cdd9bc58d2
commit ccf581edaa
6 changed files with 20 additions and 20 deletions

View file

@ -1,14 +1,14 @@
#!/bin/sh
{% if ansible_hostname == 'hetzner-01' %}
{% 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_hostname == 'RaspiBeyerstedt' %}
{% elif ansible_facts['hostname'] == 'RaspiBeyerstedt' %}
/sbin/ifconfig $INTERFACE down
/bin/ip route del {{ tinc_remote_nets[0].net_cidr }} dev eth0
{% elif ansible_os_family == 'Darwin' %}
{% 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 }}