diff --git a/automation/roles/bubble/files/bubble_restore_monitor.sh b/automation/roles/bubble/files/bubble_restore_monitor.sh index 0e12b11a..b996d210 100755 --- a/automation/roles/bubble/files/bubble_restore_monitor.sh +++ b/automation/roles/bubble/files/bubble_restore_monitor.sh @@ -21,7 +21,7 @@ function die { } function log { - echo "${1}" >> ${LOG} + echo "[$(date)] ${1}" >> ${LOG} } START=$(date +%s) @@ -107,6 +107,7 @@ log "Flushing redis" echo "FLUSHALL" | redis-cli || die "Error flushing redis" # restore algo configs +log "Restoring algo configs" CONFIGS_BACKUP=/home/bubble/.BUBBLE_ALGO_CONFIGS.tgz if [[ ! -f ${CONFIGS_BACKUP} ]] ; then log "Warning: Algo VPN configs backup not found: ${CONFIGS_BACKUP}, not installing algo" @@ -124,7 +125,8 @@ else cd "${ANSIBLE_DIR}" && \ . ./venv/bin/activate && \ - bash -c "ansible-playbook ${SSH_OPTIONS} --tags 'post_restore,always' --inventory ./hosts ./playbook.yml" \ + bash -c \ + "ansible-playbook ${SSH_OPTIONS} --tags 'post_restore,always' --inventory ./hosts ./playbook.yml 2>&1 >> ${LOG}" \ || die "Error running ansible in post-restore. journalctl -xe = $(journalctl -xe | tail -n 50)" fi