infra/deploy.sh

19 lines
347 B
Bash
Executable File

#!/bin/bash
CMD="ANSIBLE_RETRY_FILES_ENABLED=0 ansible-playbook recette.yml"
if [[ $# = 0 ]]; then
CMD="$CMD --connection=local --inventory 127.0.0.1, --limit 127.0.0.1"
fi
for arg in "$@"; do
if [[ $arg = "remote" ]]; then
CMD="$CMD -i hosts"
fi
if [[ $arg = "check" ]]; then
CMD="$CMD --syntax-check"
fi
done
eval $CMD