12 lines
157 B
Bash
Executable file
12 lines
157 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if [[ $1 == "-i" ]]; then
|
|
ARGS="-i $2"
|
|
shift 2
|
|
fi
|
|
|
|
HOSTS="$1"
|
|
CMD="$2"
|
|
|
|
eval "ansible $ARGS -b -m shell -a \"$CMD\" \"$HOSTS\""
|