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

Add puppet confdir option #4740

Merged
merged 4 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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).
7 changes: 7 additions & 0 deletions plugins/modules/system/puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
description:
- Puppet environment to be used.
type: str
confdir:
description:
- Path to the directory containing the puppet.conf file.
type: str
logdest:
description:
- Where the puppet logs should go, if puppet apply is being used.
Expand Down Expand Up @@ -179,6 +183,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 +260,8 @@ def main():
cmd += " --server %s" % shlex_quote(p['puppetmaster'])
if p['show_diff']:
cmd += " --show_diff"
if p['confdir']:
cmd += " --confdir '%s'" % p['confdir']
if p['environment']:
cmd += " --environment '%s'" % p['environment']
if p['tags']:
Expand Down