summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2016-03-17 18:42:16 +0100
committerBrian Coca <bcoca@users.noreply.github.com>2016-11-17 19:30:42 -0500
commit221a4e7014882e71b8a51a7a09b0d027783751f3 (patch)
tree9b84569a1c4fc2f991a417a03d3dde06a5b9eae9
parent7148023f59581703d2ea8bf17cc9667bd5b6a4cb (diff)
downloadansible-221a4e7014882e71b8a51a7a09b0d027783751f3.tar.gz
Ensure we end with a newline in normal mode
-rw-r--r--lib/ansible/plugins/callback/dense.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/ansible/plugins/callback/dense.py b/lib/ansible/plugins/callback/dense.py
index 7c5a76d233..97919bcdc1 100644
--- a/lib/ansible/plugins/callback/dense.py
+++ b/lib/ansible/plugins/callback/dense.py
@@ -35,9 +35,9 @@ import sys
#
# + On screen there should only be relevant stuff
# - How far are we ? (during run, last line)
-# - What issues did we have
-# - What changes have occured
-# - Diff output
+# - What issues occurred
+# - What changes occurred
+# - Diff output (in diff-mode)
#
# + If verbosity increases, act as default output
# So that users can easily switch to default for troubleshooting
@@ -424,15 +424,16 @@ class CallbackModule_dense(CallbackModule_default):
sys.stdout.flush()
def v2_playbook_on_stats(self, stats):
- # In normal mode screen output should be sufficient
- if self._display.verbosity == 0:
- return
-
if self.keep:
- sys.stdout.write(ansi.restore + '\n' + ansi.save + ansi.clearline + ansi.bold)
+ sys.stdout.write(ansi.restore + '\n' + ansi.save + ansi.reset + ansi.clearline)
else:
- sys.stdout.write(ansi.restore + ansi.clearline + ansi.bold)
+ sys.stdout.write(ansi.restore + ansi.reset + ansi.clearline)
+
+ # In normal mode screen output should be sufficient, summary is redundant
+ if self._display.verbosity == 0:
+ return
+ sys.stdout.write(ansi.bold + ansi.underline)
sys.stdout.write('SUMMARY')
sys.stdout.write(ansi.restore + '\n' + ansi.save + ansi.reset + ansi.clearline)