Add color parameter
When we're logging inside of ansible, turning off ansi colors can be nice. Especially inside of Zuul. Change-Id: I719ebb106fbb31795cc02c9504507bdae607bcdd
This commit is contained in:
parent
7570d49d8e
commit
0505f79daa
@ -167,6 +167,7 @@ def main():
|
||||
facter_basename=dict(default='ansible'),
|
||||
environment=dict(required=False, default=None),
|
||||
certname=dict(required=False, default=None),
|
||||
color=dict(required=False, default=None),
|
||||
tags=dict(required=False, default=None, type='list'),
|
||||
execute=dict(required=False, default=None),
|
||||
noop=dict(required=False, default=False, type='bool'),
|
||||
@ -254,6 +255,8 @@ def main():
|
||||
cmd += " --tags '%s'" % ','.join(p['tags'])
|
||||
if p['certname']:
|
||||
cmd += " --certname='%s'" % p['certname']
|
||||
if p['color']:
|
||||
cmd += " --color='%s'" % p['color']
|
||||
if module.check_mode or p['noop']:
|
||||
# Noop causes detailed-exitcodes to sometimes erroneously
|
||||
# return failures, so we only set detailed-exitcodes when
|
||||
|
@ -135,6 +135,7 @@
|
||||
facts: "{{ facts|default(omit) }}"
|
||||
facter_basename: "{{ facter_basename|default(omit) }}"
|
||||
logdest: "{{ puppet_logdest|default(omit) }}"
|
||||
color: "{{ puppet_color|default(omit) }}"
|
||||
environment: "{{ puppet_environment|default(omit) }}"
|
||||
noop: "{{ puppet_noop|default(omit) }}"
|
||||
debug: "{{ puppet_debug|default(omit) }}"
|
||||
|
Loading…
Reference in New Issue
Block a user