From 57427fc3787236d3034ca31dcecbef73775076ac Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 28 Jun 2024 16:47:41 -0400 Subject: [PATCH] fix minor typo of playbook name --- automation/new_droplet.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/automation/new_droplet.sh b/automation/new_droplet.sh index 4ba93a7..009cf6d 100755 --- a/automation/new_droplet.sh +++ b/automation/new_droplet.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -e # Exit on error -cd "$(dirname "$0")" +cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )" + [ `whoami` = root ] || { sudo "$0" "$@"; exit $?; } # enforce root as the ansible ssh key is installed under root . ../dmoj/scripts/utils/notify @@ -60,7 +61,7 @@ echo "SSH is available!" # Run the Ansible playbook once SSH is up echo "Running Ansible playbook..." -fetch_inventory | ansible-playbook -i /dev/stdin playbooks/initalize_worker.yml --extra-vars "droplet_name=$1 ansible_host=$droplet_priv_ipv4 public_ipv4=$droplet_pub_ipv4 ansible_user=root" +fetch_inventory | ansible-playbook -i /dev/stdin ./playbooks/initialize_worker.yml --extra-vars "droplet_name=$1 ansible_host=$droplet_priv_ipv4 public_ipv4=$droplet_pub_ipv4 ansible_user=root" notify "Droplet $1 is provisioned and configured!"