mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
iiab-install ordering
This commit is contained in:
parent
3abea5f147
commit
90020a25ba
1 changed files with 15 additions and 15 deletions
30
iiab-install
30
iiab-install
|
@ -3,15 +3,6 @@
|
||||||
# Add cmdline options for passing to ansible
|
# Add cmdline options for passing to ansible
|
||||||
# Todo add proper shift to gobble up --debug --reinstall
|
# Todo add proper shift to gobble up --debug --reinstall
|
||||||
|
|
||||||
if [ "$1" != "--debug" ] && [ "$1" != "--reinstall" ] && [ "$1" != "" ]; then
|
|
||||||
echo "Use './iiab-install' for regular installs, or to continue an install."
|
|
||||||
echo "Use './iiab-install --reinstall' to force running all Stages 0-9."
|
|
||||||
echo "Use './iiab-install --debug' to run Stage 0, followed by Stages 3-9."
|
|
||||||
echo "Use './runtags' to run a single Stage or Tag or Role."
|
|
||||||
echo "Use './iiab-network' to run Network sections."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
PLAYBOOK="iiab-stages.yml"
|
PLAYBOOK="iiab-stages.yml"
|
||||||
INVENTORY="ansible_hosts"
|
INVENTORY="ansible_hosts"
|
||||||
ARGS=""
|
ARGS=""
|
||||||
|
@ -23,12 +14,27 @@ MIN_ANSIBLE_VER=2.4.1.0
|
||||||
|
|
||||||
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
||||||
|
|
||||||
|
if [ ! -f /etc/ansible/facts.d/local_facts.fact ]; then
|
||||||
|
mkdir -p /etc/ansible/facts.d
|
||||||
|
fi
|
||||||
|
cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact
|
||||||
|
echo "Placed /etc/ansible/facts.d/local_facts.fact into position."
|
||||||
|
|
||||||
if [ ! -f $PLAYBOOK ]; then
|
if [ ! -f $PLAYBOOK ]; then
|
||||||
echo "EXITING: IIAB Playbook not found."
|
echo "EXITING: IIAB Playbook not found."
|
||||||
echo "Please run 'iiab-install' from /opt/iiab/iiab (top level of git repo)."
|
echo "Please run 'iiab-install' from /opt/iiab/iiab (top level of git repo)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" != "--debug" ] && [ "$1" != "--reinstall" ] && [ "$1" != "" ]; then
|
||||||
|
echo "Use './iiab-install' for regular installs, or to continue an install."
|
||||||
|
echo "Use './iiab-install --reinstall' to force running all Stages 0-9."
|
||||||
|
echo "Use './iiab-install --debug' to run Stage 0, followed by Stages 3-9."
|
||||||
|
echo "Use './runtags' to run a single Stage or Tag or Role."
|
||||||
|
echo "Use './iiab-network' to run Network sections."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Subroutine compares software version numbers. Generates rare false positives
|
# Subroutine compares software version numbers. Generates rare false positives
|
||||||
# like "1.0 > 1" and "2.4.0 > 2.4". Avoid risks by structuring conditionals w/
|
# like "1.0 > 1" and "2.4.0 > 2.4". Avoid risks by structuring conditionals w/
|
||||||
# a consistent # of decimal points e.g. "if version_gt w.x.y.z a.b.c.d; then"
|
# a consistent # of decimal points e.g. "if version_gt w.x.y.z a.b.c.d; then"
|
||||||
|
@ -61,12 +67,6 @@ if version_gt $MIN_ANSIBLE_VER $CURR_ANSIBLE_VER; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f /etc/ansible/facts.d/local_facts.fact ]; then
|
|
||||||
mkdir -p /etc/ansible/facts.d
|
|
||||||
fi
|
|
||||||
cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact
|
|
||||||
echo "Placed /etc/ansible/facts.d/local_facts.fact into position."
|
|
||||||
|
|
||||||
# Stage 0 will always be run. From there on up to Stage 9 we keep a counter
|
# Stage 0 will always be run. From there on up to Stage 9 we keep a counter
|
||||||
# (in /etc/iiab/iiab.env) of the highest completed Stage. Avoid repetition!
|
# (in /etc/iiab/iiab.env) of the highest completed Stage. Avoid repetition!
|
||||||
STAGE=0
|
STAGE=0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue