mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix command line construction in the puppet module (#114)
* puppet: fix check-mode Commit69ead0ba78
in the ansible/ansible repository introduced another if-statement in the middle of a if/elif pair, which causes the elif to execute together with the original if which created '--noop --no-noop' commands * puppet: fix manifest whitespace There was a space missing before the manifest path causing issues like: "invalid option: --noop/test.pp" * puppet: Add a changelog entry for8d7c830
and6ed7f06
This commit is contained in:
parent
45b171a064
commit
20aa1ef55e
2 changed files with 8 additions and 6 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "puppet - fix command line construction for check mode and ``manifest:``"
|
|
@ -255,16 +255,16 @@ def main():
|
|||
cmd += " --certname='%s'" % p['certname']
|
||||
if module.check_mode:
|
||||
cmd += " --noop"
|
||||
if p['use_srv_records'] is not None:
|
||||
if not p['use_srv_records']:
|
||||
cmd += " --no-use_srv_records"
|
||||
else:
|
||||
cmd += " --use_srv_records"
|
||||
elif 'noop' in p:
|
||||
if p['noop']:
|
||||
cmd += " --noop"
|
||||
else:
|
||||
cmd += " --no-noop"
|
||||
if p['use_srv_records'] is not None:
|
||||
if not p['use_srv_records']:
|
||||
cmd += " --no-use_srv_records"
|
||||
else:
|
||||
cmd += " --use_srv_records"
|
||||
else:
|
||||
cmd = "%s apply --detailed-exitcodes " % base_cmd
|
||||
if p['logdest'] == 'syslog':
|
||||
|
@ -289,7 +289,7 @@ def main():
|
|||
if p['execute']:
|
||||
cmd += " --execute '%s'" % p['execute']
|
||||
else:
|
||||
cmd += shlex_quote(p['manifest'])
|
||||
cmd += " %s" % shlex_quote(p['manifest'])
|
||||
if p['summarize']:
|
||||
cmd += " --summarize"
|
||||
if p['debug']:
|
||||
|
|
Loading…
Reference in a new issue