From 3a6743fb54e1e2291b2a8db3a5a0f9e397685823 Mon Sep 17 00:00:00 2001 From: Mark Szymanski Date: Fri, 17 Jun 2016 16:12:01 +1000 Subject: [PATCH] Allowing hostcolor colours to be set --- lib/ansible/utils/color.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/utils/color.py b/lib/ansible/utils/color.py index 35b60f489b..bc072c2fbb 100644 --- a/lib/ansible/utils/color.py +++ b/lib/ansible/utils/color.py @@ -86,10 +86,10 @@ def colorize(lead, num, color): def hostcolor(host, stats, color=True): if ANSIBLE_COLOR and color: if stats['failures'] != 0 or stats['unreachable'] != 0: - return u"%-37s" % stringc(host, 'red') + return u"%-37s" % stringc(host, C.COLOR_ERROR) elif stats['changed'] != 0: - return u"%-37s" % stringc(host, 'yellow') + return u"%-37s" % stringc(host, C.COLOR_CHANGED) else: - return u"%-37s" % stringc(host, 'green') + return u"%-37s" % stringc(host, C.COLOR_OK) return u"%-26s" % host