ansible-role-systemd_networkd/templates/interface-cleanup.sh.j2
Kevin Carter dd82b31ee2
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-13 23:09:48 -05:00

16 lines
478 B
Django/Jinja

#!/usr/bin/env bash
# {{ ansible_managed }}
{% for item in systemd_netdevs %}
if [[ -f "/etc/systemd/network/{{ loop.index }}-{{ item.NetDev.Name }}.netdev" ]]; then
rm -f "/etc/systemd/network/{{ loop.index }}-{{ item.NetDev.Name }}.netdev"
fi
{% endfor %}
{% for item in systemd_networks %}
if [[ -f "/etc/systemd/network/{{ loop.index }}-{{ item.interface }}.network" ]]; then
rm -f "/etc/systemd/network/{{ loop.index }}-{{ item.interface }}.network"
fi
{% endfor %}