From 483634d3e93d2e7abe01da890a17ba1afd2c7793 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 5 Nov 2017 00:41:41 -0400 Subject: [PATCH] bail early if playbook not found --- iiab-install | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/iiab-install b/iiab-install index 703bb3ab1..67a4b4b5e 100755 --- a/iiab-install +++ b/iiab-install @@ -12,6 +12,13 @@ OS=${OS//\"/} export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" +if [ ! -f $PLAYBOOK ]; then + echo "IIAB Playbook not found." + echo "Please run this command from the top level of the git repo." + echo "Exiting." + exit 1 +fi + if [ $OS = "raspbian" ]; then echo "found" REBOOT=`uname -a | grep 4.9.59-v7+ | wc -l` @@ -58,13 +65,6 @@ else fi fi -if [ ! -f $PLAYBOOK ]; then - echo "IIAB Playbook not found." - echo "Please run this command from the top level of the git repo." - echo "Exiting." - exit 1 -fi - # if vars/local_vars.yml is missing, put a default one in place - First Run if [ ! -f ./vars/local_vars.yml ]; then case $OS in