From 3d321be92a850520ea853a48d5ea84a555ea9726 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Fri, 25 Oct 2019 12:32:06 -0500 Subject: [PATCH] iiab-install - don't repeat prior roles that completed successfully within a stage --- iiab-install | 8 ++++++++ iiab-stages.yml | 1 + 2 files changed, 9 insertions(+) diff --git a/iiab-install b/iiab-install index d8721bb7a..4715ea046 100755 --- a/iiab-install +++ b/iiab-install @@ -175,6 +175,14 @@ if [ -f /etc/iiab/config_vars2.yml ]; then ## End image catch up fi +# allow iiab-install to read IIAB_STATE_FILE to not repeat installs of previous +# roles that already completed within the stage. +if [ ! -f $IIAB_STATE_FILE ]; then + if [ ! -d /etc/iiab ]; then + mkdir /etc/iiab/ + fi + touch $IIAB_STATE_FILE +fi echo -e "\nTRY TO RERUN './iiab-install' IF IT FAILS DUE TO CONNECTIVITY ISSUES ETC!\n" echo -e "Running local Ansible playbooks...\n...Stage 0 will now run\n...followed by Stages $(($STAGE + 1))-9\n...and then the Network Role.\n" diff --git a/iiab-stages.yml b/iiab-stages.yml index 35db6f84f..0c1aef6f0 100644 --- a/iiab-stages.yml +++ b/iiab-stages.yml @@ -7,6 +7,7 @@ - vars/default_vars.yml - vars/{{ ansible_local.local_facts.os_ver }}.yml - /etc/iiab/local_vars.yml + - /etc/iiab/iiab_state.yml tasks: