mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
blue on black, tears on a river, push on a shove, it don't mean much
(make colorized playbook runs not suck on black terminals)
This commit is contained in:
parent
2030f82bf2
commit
e035ce97ce
3 changed files with 6 additions and 7 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue