Merge "[deployment_handler] Fix getting roles from fuel node output"
[releng.git] / prototypes / bifrost / scripts / test-bifrost-deployment.sh
index 914a906..3e2381f 100755 (executable)
@@ -79,6 +79,11 @@ source ${ANSIBLE_INSTALL_ROOT}/ansible/hacking/env-setup
 ANSIBLE=$(which ansible-playbook)
 set -x -o nounset
 
+logs_on_exit() {
+    $SCRIPT_HOME/collect-test-info.sh
+}
+trap logs_on_exit EXIT
+
 # Change working directory
 cd $BIFROST_HOME/playbooks
 
@@ -129,6 +134,4 @@ if [ $EXITCODE != 0 ]; then
     echo "****************************"
 fi
 
-$SCRIPT_HOME/collect-test-info.sh
-
 exit $EXITCODE