25 lines
448 B
Bash
Executable File
25 lines
448 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CMD="ANSIBLE_RETRY_FILES_ENABLED=0 ansible-playbook recette.yml"
|
|
|
|
REMOTE=false
|
|
|
|
for arg in "$@"; do
|
|
if [[ $arg = "remote" ]]; then
|
|
REMOTE=true
|
|
CMD="$CMD -i hosts"
|
|
fi
|
|
if [[ $arg = "check" ]]; then
|
|
CMD="$CMD --syntax-check"
|
|
fi
|
|
if [[ $arg = "debug" ]]; then
|
|
CMD="$CMD -vvv"
|
|
fi
|
|
done
|
|
|
|
if [[ $REMOTE = false ]]; then
|
|
CMD="$CMD --connection=local --inventory 127.0.0.1, --limit 127.0.0.1"
|
|
fi
|
|
|
|
eval $CMD
|