Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppet module is not using debug/summarize/verbose parameters in server-mode #53922

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 24 additions & 35 deletions lib/ansible/modules/system/puppet.py
Expand Up @@ -252,50 +252,39 @@ def main():
cmd += " --server %s" % pipes.quote(p['puppetmaster'])
if p['show_diff']:
cmd += " --show_diff"
if p['environment']:
cmd += " --environment '%s'" % p['environment']
if p['tags']:
cmd += " --tags '%s'" % ','.join(p['tags'])
if p['certname']:
cmd += " --certname='%s'" % p['certname']
if module.check_mode:
cmd += " --noop"
elif 'noop' in p:
if p['noop']:
cmd += " --noop"
else:
cmd += " --no-noop"
else:
cmd = "%s apply --detailed-exitcodes " % base_cmd
if p['logdest'] == 'syslog':
cmd += "--logdest syslog "
if p['logdest'] == 'all':
cmd += " --logdest syslog --logdest stdout"
if p['modulepath']:
cmd += "--modulepath='%s'" % p['modulepath']
if p['environment']:
cmd += "--environment '%s' " % p['environment']
if p['certname']:
cmd += " --certname='%s'" % p['certname']
if p['tags']:
cmd += " --tags '%s'" % ','.join(p['tags'])
if module.check_mode:
cmd += "--noop "
elif 'noop' in p:
if p['noop']:
cmd += " --noop"
else:
cmd += " --no-noop"
cmd += " --modulepath='%s'" % p['modulepath']
if p['execute']:
cmd += " --execute '%s'" % p['execute']
else:
cmd += pipes.quote(p['manifest'])
if p['summarize']:
cmd += " --summarize"
if p['debug']:
cmd += " --debug"
if p['verbose']:
cmd += " --verbose"

if p['certname']:
cmd += " --certname='%s'" % p['certname']
if p['logdest'] == 'syslog':
cmd += " --logdest syslog"
if p['logdest'] == 'all':
cmd += " --logdest syslog --logdest stdout"
if p['tags']:
cmd += " --tags '%s'" % ','.join(p['tags'])
if p['environment']:
cmd += " --environment '%s' " % p['environment']
if module.check_mode:
cmd += " --noop"
elif 'noop' in p:
if p['noop']:
cmd += " --noop"
else:
cmd += " --no-noop"
if p['debug']:
cmd += " --debug"
if p['verbose']:
cmd += " --verbose"

rc, stdout, stderr = module.run_command(cmd)

if rc == 0:
Expand Down