diff --git a/bin/ansible-playbook b/bin/ansible-playbook index cce371e2bd..bf2c0a02a7 100755 --- a/bin/ansible-playbook +++ b/bin/ansible-playbook @@ -31,9 +31,7 @@ from ansible.color import ANSIBLE_COLOR, stringc def colorize(lead, num, color): """ Print 'lead' = 'num' in 'color' """ - if num == 0: - color='black'; - if ANSIBLE_COLOR: + if num != 0 and ANSIBLE_COLOR: return "%s%s%-15s" % (stringc(lead, color), stringc("=", color), stringc(str(num), color)) else: return "%s=%-4s" % (lead, str(num)) diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index 988f4410be..d4e26fc86d 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -328,12 +328,12 @@ class PlaybookRunnerCallbacks(DefaultRunnerCallbacks): if self._async_notified[jid] > clock: self._async_notified[jid] = clock msg = " polling, %ss remaining"%(jid, clock) - print stringc(msg, 'blue') + print stringc(msg, 'cyan') def on_async_ok(self, host, res, jid): msg = " finished on %s"%(jid, host) - print stringc(msg, 'blue') + print stringc(msg, 'cyan') def on_async_failed(self, host, res, jid): @@ -379,12 +379,12 @@ class PlaybookCallbacks(object): def on_import_for_host(self, host, imported_file): msg = "%s: importing %s" % (host, imported_file) - print stringc(msg, 'blue') + print stringc(msg, 'cyan') def on_not_import_for_host(self, host, missing_file): msg = "%s: not importing file: %s" % (host, missing_file) - print stringc(msg, 'blue') + print stringc(msg, 'cyan') def on_play_start(self, pattern): diff --git a/lib/ansible/color.py b/lib/ansible/color.py index 8a67b23272..e353617eb8 100644 --- a/lib/ansible/color.py +++ b/lib/ansible/color.py @@ -40,6 +40,7 @@ codeCodes = { 'blue': '0;34', 'white': '1;37', 'green': '0;32', 'bright blue': '1;34', 'cyan': '0;36', 'bright green': '1;32', +# 'cyan': '0;32', 'bright green': '1;32', 'red': '0;31', 'bright cyan': '1;36', 'purple': '0;35', 'bright red': '1;31', 'yellow': '0;33', 'bright purple': '1;35',