From 4b948af7060131f63271f0391eabdfd4bfbcfba4 Mon Sep 17 00:00:00 2001 From: Jonathan Mainguy Date: Fri, 23 Oct 2015 13:19:10 -0400 Subject: [PATCH] Enable stdout and stderr on sucessful runs, making show_diff useable omit color symbols as ansible makes them illegible --- lib/ansible/modules/extras/system/puppet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/extras/system/puppet.py b/lib/ansible/modules/extras/system/puppet.py index 147cb9a42c1..97c1a3eb38c 100644 --- a/lib/ansible/modules/extras/system/puppet.py +++ b/lib/ansible/modules/extras/system/puppet.py @@ -211,8 +211,8 @@ def main(): if not p['manifest']: cmd = ("%(base_cmd)s agent --onetime" - " --ignorecache --no-daemonize --no-usecacheonfailure" - " --no-splay --detailed-exitcodes --verbose") % dict( + " --ignorecache --no-daemonize --no-usecacheonfailure --no-splay" + " --detailed-exitcodes --verbose --color 0") % dict( base_cmd=base_cmd, ) if p['puppetmaster']: @@ -250,7 +250,7 @@ def main(): if rc == 0: # success - module.exit_json(rc=rc, changed=False, stdout=stdout) + module.exit_json(rc=rc, changed=False, stdout=stdout, stderr=stderr) elif rc == 1: # rc==1 could be because it's disabled # rc==1 could also mean there was a compilation failure