Skip to content

Commit

Permalink
Add puppet confdir option (#4740)
Browse files Browse the repository at this point in the history
* Add puppet confdir option

* Add puppet confdir option change fragment

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

Co-authored-by: Felix Fontein <[email protected]>

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

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Georg Vogt <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
3 people authored Jun 6, 2022
1 parent b87edda commit 62ff263
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/4740-puppet-feature.yaml
Original file line number Diff line number Diff line change
@@ -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).
8 changes: 8 additions & 0 deletions plugins/modules/system/puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
description:
- Puppet environment to be used.
type: str
confdir:
description:
- Path to the directory containing the puppet.conf file.
type: str
version_added: 5.1.0
logdest:
description:
- Where the puppet logs should go, if puppet apply is being used.
Expand Down Expand Up @@ -179,6 +184,7 @@ def main():
puppetmaster=dict(type='str'),
modulepath=dict(type='str'),
manifest=dict(type='str'),
confdir=dict(type='str'),
noop=dict(type='bool'),
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
Expand Down Expand Up @@ -255,6 +261,8 @@ def main():
cmd += " --server %s" % shlex_quote(p['puppetmaster'])
if p['show_diff']:
cmd += " --show_diff"
if p['confdir']:
cmd += " --confdir %s" % shlex_quote(p['confdir'])
if p['environment']:
cmd += " --environment '%s'" % p['environment']
if p['tags']:
Expand Down

0 comments on commit 62ff263

Please sign in to comment.