mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 11:12:06 +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
|
||||
# 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"
|
||||
INVENTORY="ansible_hosts"
|
||||
ARGS=""
|
||||
|
@ -23,12 +14,27 @@ MIN_ANSIBLE_VER=2.4.1.0
|
|||
|
||||
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
|
||||
echo "EXITING: IIAB Playbook not found."
|
||||
echo "Please run 'iiab-install' from /opt/iiab/iiab (top level of git repo)."
|
||||
exit 1
|
||||
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
|
||||
# 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"
|
||||
|
@ -61,12 +67,6 @@ if version_gt $MIN_ANSIBLE_VER $CURR_ANSIBLE_VER; then
|
|||
exit 1
|
||||
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
|
||||
# (in /etc/iiab/iiab.env) of the highest completed Stage. Avoid repetition!
|
||||
STAGE=0
|
||||
|
|
Loading…
Reference in a new issue