From b8db298203e772af8951d80382e4359c7d23c5f1 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sat, 28 Oct 2017 18:29:09 -0500 Subject: [PATCH] common style --- runansible | 55 +++++++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/runansible b/runansible index b1cb710cc..6fc3dcc1a 100755 --- a/runansible +++ b/runansible @@ -9,45 +9,40 @@ ARGS="$@" export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" if [ ! -f /etc/ansible/facts.d/local_facts.fact ]; then - mkdir -p /etc/ansible/facts.d + mkdir -p /etc/ansible/facts.d fi cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact STAGE="" -if [ -f /etc/iiab/iiab.env ] -then - OLD=`grep XSCE /etc/iiab/iiab.env | wc -l` - if [ "$OLD" != 0 ] - then - echo "Found old XSCE install - re-installing from scratch" - rm /etc/iiab/iiab.env - # check ansible version here and force ansible upgrade if needed - else - source /etc/iiab/iiab.env - if [ ! $STAGE == 9 ] - then - echo "Restarting from STAGE $STAGE" +if [ -f /etc/iiab/iiab.env ]; then + OLD=`grep XSCE /etc/iiab/iiab.env | wc -l` + if [ "$OLD" != 0 ]; then + echo "Found old XSCE install - re-installing from scratch" + rm /etc/iiab/iiab.env + # check ansible version here and force ansible upgrade if needed + else + source /etc/iiab/iiab.env + if [ ! $STAGE == 9 ]; then + echo "Restarting from STAGE $STAGE" + fi + if [ $STAGE == 9 ]; then + # place keeper + echo "offer 'Y' dialog box and --debug option to override" + echo "need to rewrite STAGE= before ansible is called or rm iiab.env" + sleep 5 + #exit 0 + fi fi - if [ $STAGE == 9 ] - then - # place keeper - echo "offer 'Y' dialog box and --debug option to override" - echo "need to rewrite STAGE= before ansible is called or rm iiab.env" - sleep 5 - # exit 0 - fi - fi else - mkdir -p /etc/iiab + mkdir -p /etc/iiab 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 +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