From 2a8914e496ce9a1fbeac6d08ad9c9c25171fdcf0 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Mon, 21 Mar 2016 10:10:58 +0100 Subject: [PATCH] Reset VT100 attributes in case we get unexpected output --- lib/ansible/plugins/callback/dense.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/plugins/callback/dense.py b/lib/ansible/plugins/callback/dense.py index 99cb279d515..5c0540e71b1 100644 --- a/lib/ansible/plugins/callback/dense.py +++ b/lib/ansible/plugins/callback/dense.py @@ -349,6 +349,7 @@ class CallbackModule_dense(CallbackModule_default): # Write the next task on screen (behind the prompt is the previous output) sys.stdout.write('%s %d.' % (self.type, self.count[self.type])) + sys.stdout.write(v100.reset) sys.stdout.flush() def v2_playbook_on_handler_task_start(self, task): @@ -371,6 +372,7 @@ class CallbackModule_dense(CallbackModule_default): # Write the next task on screen (behind the prompt is the previous output) sys.stdout.write('%s %d.' % (self.type, self.count[self.type])) + sys.stdout.write(v100.reset) sys.stdout.flush() def v2_playbook_on_cleanup_task_start(self, task):