19 lines
337 B
Django/Jinja
19 lines
337 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']['bridge'] }} {{ mac }}
|
|
;;
|
|
{% endfor %}
|
|
|
|
*)
|
|
echo "unknown: $arg"
|
|
;;
|
|
esac
|
|
done
|