deploy.sh check fait la --syntax-check et peut être utilisé avec l'argument local
This commit is contained in:
parent
c7c790e608
commit
49fa247792
20
deploy.sh
20
deploy.sh
|
@ -1,10 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $1 = "test" ]]; then
|
||||
ansible-playbook --check -i hosts recette.yml
|
||||
elif [[ $1 = "local" ]]; then
|
||||
ansible-playbook --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 \
|
||||
recette.yml -i hosts
|
||||
else
|
||||
ansible-playbook -i hosts recette.yml
|
||||
fi
|
||||
CMD="ansible-playbook -i hosts recette.yml"
|
||||
|
||||
for arg in "$@"; do
|
||||
if [[ $arg = "local" ]]; then
|
||||
CMD="$CMD --connection=local --inventory 127.0.0.1, --limit 127.0.0.1"
|
||||
fi
|
||||
if [[ $arg = "check" ]]; then
|
||||
CMD="$CMD --syntax-check"
|
||||
fi
|
||||
done
|
||||
|
||||
eval $CMD
|
||||
|
|
Loading…
Reference in New Issue