From 338ebcef80e5aca4c41e82edaf4066759c87e09d Mon Sep 17 00:00:00 2001 From: Marco Ochse Date: Wed, 5 Jul 2023 23:34:15 +0200 Subject: [PATCH] Add check if Playbook ran successfully. --- install.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install.sh b/install.sh index 85d9c5eb..db61c96b 100755 --- a/install.sh +++ b/install.sh @@ -145,6 +145,18 @@ echo "### Now running T-Pot Ansible Installation Playbook ..." echo ANSIBLE_LOG_PATH=${PWD}/install_tpot.log ansible-playbook ${myANSIBLE_TPOT_PLAYBOOK} -i 127.0.0.1, -c local --tags "${myANSIBLE_TAG}" ${myANSIBLE_BECOME_OPTION} +# Something went wrong +if [ ! $? -eq 0 ]; + then + echo "### Something went wrong with the Playbook, please review the output and / or install_tpot.log for clues." + echo "### Aborting." + echo + exit 1 + else + echo "### Playbook was successful." + echo +fi + # Asking for web user name myWEB_USER="" while [ 1 != 2 ];