lab-ansible/tools/reboot.sh

11 lines
137 B
Bash
Raw Normal View History

2023-12-28 18:11:49 +00:00
#!/usr/bin/env bash
2024-01-30 19:55:48 +00:00
if [[ $1 == "-i" ]]; then
ARGS="-i $2"
shift 2
fi
2023-12-28 18:11:49 +00:00
HOSTS="$1"
2024-01-30 19:55:48 +00:00
eval "ansible $ARGS -b -m reboot \"$HOSTS\""