1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add puppet confdir option (#4740) (#4787)

* Add puppet confdir option

* Add puppet confdir option change fragment

* Improve quoting in plugins/modules/system/puppet.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add version_added to plugins/modules/system/puppet.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Georg Vogt <georg.vogt@tngtech.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 62ff263ac1)

Co-authored-by: Ge0rgi0s <34042518+Ge0rgi0s@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2022-06-06 10:57:37 +02:00 committed by GitHub
parent 3af9e39043
commit 8f0ee6966f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- puppet - adds ``confdir`` parameter to configure a custom confir location (https://github.com/ansible-collections/community.general/pull/4740).

View file

@ -51,6 +51,11 @@ options:
description: description:
- Puppet environment to be used. - Puppet environment to be used.
type: str type: str
confdir:
description:
- Path to the directory containing the puppet.conf file.
type: str
version_added: 5.1.0
logdest: logdest:
description: description:
- Where the puppet logs should go, if puppet apply is being used. - Where the puppet logs should go, if puppet apply is being used.
@ -179,6 +184,7 @@ def main():
puppetmaster=dict(type='str'), puppetmaster=dict(type='str'),
modulepath=dict(type='str'), modulepath=dict(type='str'),
manifest=dict(type='str'), manifest=dict(type='str'),
confdir=dict(type='str'),
noop=dict(type='bool'), noop=dict(type='bool'),
logdest=dict(type='str', default='stdout', choices=['all', 'stdout', 'syslog']), logdest=dict(type='str', default='stdout', choices=['all', 'stdout', 'syslog']),
# The following is not related to Ansible's diff; see https://github.com/ansible-collections/community.general/pull/3980#issuecomment-1005666154 # The following is not related to Ansible's diff; see https://github.com/ansible-collections/community.general/pull/3980#issuecomment-1005666154
@ -255,6 +261,8 @@ def main():
cmd += " --server %s" % shlex_quote(p['puppetmaster']) cmd += " --server %s" % shlex_quote(p['puppetmaster'])
if p['show_diff']: if p['show_diff']:
cmd += " --show_diff" cmd += " --show_diff"
if p['confdir']:
cmd += " --confdir %s" % shlex_quote(p['confdir'])
if p['environment']: if p['environment']:
cmd += " --environment '%s'" % p['environment'] cmd += " --environment '%s'" % p['environment']
if p['tags']: if p['tags']: