mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
simplified each [[ CMD
]] + ansible version logic
This commit is contained in:
parent
5179c95303
commit
8f361d4c51
1 changed files with 8 additions and 6 deletions
10
iiab-install
10
iiab-install
|
@ -54,8 +54,10 @@ fi
|
|||
# Verify that a recent enough version of Ansible is installed. See #449. The
|
||||
# "include:" command was inconsistently implemented prior to Ansible 2.4.x.x
|
||||
CURR_ANSIBLE_VER=0
|
||||
if [[ `type -P ansible` ]]; then
|
||||
CURR_ANSIBLE_VER=`ansible --version | head -1 | sed -e 's/.* //'`
|
||||
if type -P ansible ; then
|
||||
#CURR_ANSIBLE_VER=`ansible --version | head -1 | sed -e 's/.* //'`
|
||||
#CURR_ANSIBLE_VER=`ansible --version | head -1 | cut -f 2 -d " "`
|
||||
CURR_ANSIBLE_VER=`ansible --version | head -1 | awk '{print $2}'`
|
||||
echo "Found Ansible "$CURR_ANSIBLE_VER""
|
||||
fi
|
||||
if version_gt $MIN_ANSIBLE_VER $CURR_ANSIBLE_VER ; then
|
||||
|
@ -71,7 +73,7 @@ fi
|
|||
# (in /etc/iiab/iiab.env) of the highest completed Stage. Avoid repetition!
|
||||
STAGE=0
|
||||
if [ -f /etc/iiab/iiab.env ]; then
|
||||
if [[ `grep STAGE= /etc/iiab/iiab.env` ]]; then
|
||||
if grep -q STAGE= /etc/iiab/iiab.env ; then
|
||||
source /etc/iiab/iiab.env
|
||||
echo "Extracted STAGE="$STAGE" (counter) from /etc/iiab/iiab.env"
|
||||
if ! [ "$STAGE" -eq "$STAGE" ] 2> /dev/null; then
|
||||
|
@ -83,7 +85,7 @@ if [ -f /etc/iiab/iiab.env ]; then
|
|||
fi
|
||||
fi
|
||||
# if XSCE is present resolveconf will not be
|
||||
if [[ `grep XSCE /etc/iiab/iiab.env` ]]; then
|
||||
if grep -q XSCE /etc/iiab/iiab.env ; then
|
||||
STAGE=0
|
||||
rm /etc/iiab/iiab.env
|
||||
echo "Removed /etc/iiab/iiab.env effectively resetting STAGE (counter)."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue