Skip to content

Commit 8910555

Browse files
authored
puppet: use better CmdRunner param formatting (#10014)
* puppet: use better CmdRunner param formatting * ignore none * add changelog frag
1 parent 5ef6f1e commit 8910555

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- puppet - improve parameter formatting, no impact to user (https://github.com/ansible-collections/community.general/pull/10014).

plugins/module_utils/puppet.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ def execute_func(execute, manifest):
9595
skip_tags=cmd_runner_fmt.as_func(lambda v: ["--skip_tags", ",".join(v)]),
9696
certname=cmd_runner_fmt.as_opt_eq_val("--certname"),
9797
noop=cmd_runner_fmt.as_func(noop_func),
98-
use_srv_records=cmd_runner_fmt.as_map({
99-
True: "--usr_srv_records",
100-
False: "--no-usr_srv_records",
101-
}),
98+
use_srv_records=cmd_runner_fmt.as_bool("--usr_srv_records", "--no-usr_srv_records", ignore_none=True),
10299
logdest=cmd_runner_fmt.as_map(_logdest_map, default=[]),
103100
modulepath=cmd_runner_fmt.as_opt_eq_val("--modulepath"),
104101
_execute=cmd_runner_fmt.as_func(execute_func),

0 commit comments

Comments
 (0)