mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
iiab_state2
This commit is contained in:
parent
916d3052ae
commit
6be97bba6c
2 changed files with 8 additions and 8 deletions
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
PLAYBOOK="iiab-stages.yml"
|
PLAYBOOK="iiab-stages.yml"
|
||||||
INVENTORY="ansible_hosts"
|
INVENTORY="ansible_hosts"
|
||||||
|
APPS=/etc/iiab/iiab_state.yml
|
||||||
ARGS=""
|
ARGS=""
|
||||||
CWD=`pwd`
|
CWD=`pwd`
|
||||||
OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
||||||
|
|
15
runrole
15
runrole
|
@ -43,26 +43,25 @@ if [ "$1" == "--reinstall" ]; then
|
||||||
shift 1
|
shift 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# needed for stage 1-3 if not installed yet
|
# Needed for Stages 1-3 if not installed yet
|
||||||
if [ ! -f $APPS ]; then
|
if [ ! -f $IIAB_STATE_FILE ]; then
|
||||||
mkdir -p /etc/iiab
|
touch $IIAB_STATE_FILE
|
||||||
touch $APPS
|
|
||||||
fi
|
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 " $1_install: not found in $VARS"
|
||||||
echo " Please review $VARS and edit as required"
|
echo " Please review $VARS and edit as required"
|
||||||
exit 1
|
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 " $1_install: set to False found in $VARS"
|
||||||
echo " Please review $VARS and edit as required"
|
echo " Please review $VARS and edit as required"
|
||||||
exit 1
|
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 " $1_install: commented out (#) in $VARS"
|
||||||
echo " Please review $VARS and edit as required"
|
echo " Please review $VARS and edit as required"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
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 " $1_install: set to True found in $VARS"
|
||||||
echo " continuing...."
|
echo " continuing...."
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue