.
This commit is contained in:
18
salt/states/wol/files/wol.jinja
Normal file
18
salt/states/wol/files/wol.jinja
Normal file
@@ -0,0 +1,18 @@
|
||||
#/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
|
Reference in New Issue
Block a user