Commit 9bc2ad4b authored by Mattia Rizzolo's avatar Mattia Rizzolo

fix some warnings from shellcheck

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mapreri@ubuntu.com>
parent d980571a
......@@ -8,7 +8,7 @@ DIR_ENVIRONMENTS="envs"
DIR_ROLES="roles"
DIR_GROUP_VARS="group_vars"
FILE_VAULT_PASSWORD="vault-password"
#FILE_VAULT_PASSWORD="vault-password"
BIN_ANSIBLE_PLAYBOOK="ansible-playbook"
......@@ -40,7 +40,7 @@ if [[ ! -d "${env}" ]]; then
echo
echo "available environments:"
for available in `ls -1 "${DIR_ENVIRONMENTS}"`; do
for available in $(ls -1 "${DIR_ENVIRONMENTS}"); do
echo " - ${available}"
done
exit 1
......@@ -50,8 +50,8 @@ if [[ ! -f "${playbook_file}" ]]; then
echo
echo "available playbooks:"
for available in `ls -1 "${DIR_PLAYBOOKS}"`; do
echo " - `echo "${available}" | sed 's/\.yml$//'`"
for available in $(ls -1 "${DIR_PLAYBOOKS}"); do
echo " - ${available%.yml}"
done
exit 1
fi
......@@ -62,13 +62,13 @@ function cleanup () { rm -rf "$DIR_TEMP"; }
mkdir -p "$DIR_TEMP/play"
trap cleanup EXIT
ln -s "`readlink -e "${DIR_ROLES}"`" "${DIR_TEMP}/play/roles"
ln -s "`readlink -e "${DIR_GROUP_VARS}"`" "${DIR_TEMP}/play/group_vars"
ln -s "`readlink -e "${playbook_file}"`" "${DIR_TEMP}/play/playbook.yml"
ln -s "`readlink -e "${env}"`" "${DIR_TEMP}/env"
ln -s "$(readlink -e "${DIR_ROLES}")" "${DIR_TEMP}/play/roles"
ln -s "$(readlink -e "${DIR_GROUP_VARS}")" "${DIR_TEMP}/play/group_vars"
ln -s "$(readlink -e "${playbook_file}")" "${DIR_TEMP}/play/playbook.yml"
ln -s "$(readlink -e "${env}")" "${DIR_TEMP}/env"
# Finally execute the playbook against the server
"${BIN_ANSIBLE_PLAYBOOK}" -i "${DIR_TEMP}/env/hosts" \
"${DIR_TEMP}/play/playbook.yml" \
-vv --diff \
$@
"${@}"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment