summaryrefslogtreecommitdiff
path: root/roles/install_wireguard_mesh/templates/down.sh.j2
blob: 979523c82109486be0ab2bbcee5c777f92bc3917 (plain)
1
2
3
4
5
6
7
8
#!/bin/bash
{% for host in groups['fastd'] %}
{% for site in hostvars[host]['sites'] if site.name == item.name and site.wireguard_mesh_number != item.wireguard_mesh_number %}
batctl -m bat{{ item.name }} if del mesh{{ item.name }}{{ site.wireguard_mesh_number }}
ip link set down dev mesh{{ item.name }}{{ site.wireguard_mesh_number }}
ip link del mesh{{ item.name }}{{ site.wireguard_mesh_number }} type ip6gretap
{% endfor %}
{% endfor %}