diff --git a/setup.sh b/setup.sh index ee59d97..9c471c7 100755 --- a/setup.sh +++ b/setup.sh @@ -208,6 +208,14 @@ if [[ -n "$create_server" && ! -f "$server_config" ]]; then ls -lh "$server_config" fi +echo "Verifying this is the only run..." +ps -ef | grep ansible-playbook | grep -v grep +ansible_exists="$?" +if [[ "$ansible_exists" == 0 ]]; then + echo "Playbook is already being executed. Exiting." + exit 0 +fi + echo "Provisioning Ansible..." if [[ $local == "Y" ]]; then sudo ansible-playbook $LOCAL