1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

iiab_state2

This commit is contained in:
Jerry Vonau 2019-10-24 11:51:56 -05:00
parent 916d3052ae
commit 6be97bba6c
2 changed files with 8 additions and 8 deletions

View file

@ -5,6 +5,7 @@
PLAYBOOK="iiab-stages.yml"
INVENTORY="ansible_hosts"
APPS=/etc/iiab/iiab_state.yml
ARGS=""
CWD=`pwd`
OS=`grep ^ID= /etc/*release|cut -d= -f2`

15
runrole
View file

@ -43,26 +43,25 @@ if [ "$1" == "--reinstall" ]; then
shift 1
fi
# needed for stage 1-3 if not installed yet
if [ ! -f $APPS ]; then
mkdir -p /etc/iiab
touch $APPS
# Needed for Stages 1-3 if not installed yet
if [ ! -f $IIAB_STATE_FILE ]; then
touch $IIAB_STATE_FILE
fi
if ! grep -q $1_install $VARS; then
if ! grep -q $1_install $LOCAL_VARS_FILE; then
echo " $1_install: not found in $VARS"
echo " Please review $VARS and edit as required"
exit 1
elif grep $1_install $VARS | grep -q --exclude "#" False; then
elif grep $1_install $LOCAL_VARS_FILE | grep -q --exclude "#" False; then
echo " $1_install: set to False found in $VARS"
echo " Please review $VARS and edit as required"
exit 1
elif grep $1_install $VARS | grep -q "#"; then
elif grep $1_install $LOCAL_VARS_FILE | grep -q "#"; then
echo " $1_install: commented out (#) in $VARS"
echo " Please review $VARS and edit as required"
exit 1
else
if grep $1_install $VARS | grep -q --exclude "#" True; then
if grep $1_install $LOCAL_VARS_FILE | grep -q --exclude "#" True; then
echo " $1_install: set to True found in $VARS"
echo " continuing...."
else