setup, ensure variables are quoted.

This commit is contained in:
me
2026-09-29 10:32:04 -07:00
parent 5be56dd7f8
commit 2d6bba789c
+4 -4
View File
@@ -5,7 +5,7 @@
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
PROG="$(basename -- "${BASH_SOURCE[0]}")"
LOCAL=$DIR/local.yml
LOCAL="$DIR/local.yml"
URL="https://git.hyperling.com/me/env-ansible"
if [[ -z $BRANCH ]]; then
export BRANCH="main"
@@ -215,14 +215,14 @@ lock_file=/tmp/ansible-playbook.lock
if [[ "$ansible_exists" == 0 ]]; then
echo "Playbook is already being executed. Exiting."
exit 0
elif [[ -e $lock_file ]]; then
elif [[ -e "$lock_file" ]]; then
echo "Playbook not being executed. Removing lock file."
sudo mv -v "$lock_file" "${lock_file}.diaabled"
sudo mv -v "$lock_file" "${lock_file}.disabled"
fi
echo "- Verified!"
echo "Provisioning Ansible..."
if [[ $local == "Y" ]]; then
if [[ "$local" == "Y" ]]; then
sudo ansible-playbook $LOCAL
else
sudo ansible-pull -U $URL.git --checkout $branch