From a9244537d62662ab3342d1c1bdb74e3b1f23ad0e Mon Sep 17 00:00:00 2001 From: David Wilde Date: Fri, 6 Mar 2015 17:34:35 -0600 Subject: [PATCH] Trim ansible's output to console.log Since I2786f73334b99bfa98d344c50337c86f75fae273 ansible's output is logged properly to a file and published at the end of a gate check. This trims the output from ansible to the console to make the console log that is published far shorter and easier to read. Co-Authored-By: Ian Cordasco Change-Id: I98fb57a56c1b7ddd6558e265cf6e65b159a05123 Partial-bug: 1425482 --- scripts/gate-check-commit.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index be645c94ed..ed3761e707 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -73,7 +73,18 @@ set +x && get_instance_info && set -x # Run the ansible playbooks if required if [ "${RUN_PLAYBOOKS}" == "yes" ]; then - source $(dirname ${0})/run-playbooks.sh + # Set-up our tiny awk script. + strip_debug=" + !/(^[ 0-9|:.-]+<[0-9.]|localhost+>)|Extracting/ { + gsub(/{.*/, \"\"); + gsub(/\\n.*/, \"\"); + gsub(/\=\>.*/, \"\"); + print + } + " + source $(dirname ${0})/run-playbooks.sh > ansible-logs.tmp + awk "${strip_debug}" < ansible-logs.tmp + rm -f ansible-logs.tmp fi # Run the tempest tests if required