Skip to content

Commit a3b8244

Browse files
committed
added "if" to not run
"puppetserver ca --certname <null>". The inline template is adding a comma and when it goes to run the next iteration it has no value for the certname, causing a failure. This is for a monlithic-master.
1 parent 136ae26 commit a3b8244

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: plans/unit/install.pp

+6-4
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,12 @@
298298
# For now, waiting a short period of time is necessary to avoid a small race.
299299
ctrl::sleep(15)
300300

301-
run_command(inline_epp(@(HEREDOC/L)), $master_target)
302-
/opt/puppetlabs/bin/puppetserver ca sign --certname \
303-
<%= $agent_installer_targets.map |$target| { $target.host }.join(',') -%>
304-
| HEREDOC
301+
if !empty($agent_installer_targets) {
302+
run_command(inline_epp(@(HEREDOC/L)), $master_target)
303+
/opt/puppetlabs/bin/puppetserver ca sign --certname \
304+
<%= $agent_installer_targets.map |$target| { $target.host }.join(',') -%>
305+
| HEREDOC
306+
}
305307

306308
run_task('pe_xl::puppet_runonce', $master_target)
307309
run_task('pe_xl::puppet_runonce', $all_targets - $master_target)

0 commit comments

Comments
 (0)