tlu/salt/states/wol/files/wol.jinja
Jonas Forsberg 7019e46395 .
2021-10-16 15:59:28 +02:00

19 lines
350 B
Django/Jinja

#/bin/bash
set -aeou pipefail
for arg in "$@"
do
case "$arg" in
{% for number, mac in pillar['network']['wol'].items() %}
{{ number }}|srv{{ number }}|server{{ number }})
sudo ether-wake -i {{ pillar['network']['interface']['bridge'] }} {{ mac }}
;;
{% endfor %}
*)
echo "unknown: $arg"
;;
esac
done