mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
13 lines
310 B
Bash
13 lines
310 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# pass comma-separated server(s) as arg; reboot and wait up to 10 min
|
||
|
if [ "$1" = "" ]; then
|
||
|
echo "Provide at least one target server as parameter"
|
||
|
exit 404;
|
||
|
else
|
||
|
servers=${@%,} # omit trailing comma
|
||
|
echo "$servers"
|
||
|
ansible-playbook reboot-and-wait.yml --become -e "target=$servers"
|
||
|
fi
|
||
|
|