Skip to content

Commit

Permalink
(PE-39429) Use correct targets and only run if those targets are non-…
Browse files Browse the repository at this point in the history
…empty. This fixes errors about run_command needing 3 args when no compilers are present
  • Loading branch information
jhbuchanan45 committed Oct 16, 2024
1 parent 528d200 commit 1ae13c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plans/convert.pp
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,14 @@
# Restart cluster compiler services that are likely not restarted by our
# final Puppet run to increase chance everything is functional upon plan
# completion
run_command('systemctl restart pe-puppetserver.service', $legacy_compiler_targets)
if $legacy_compiler_targets {
run_command('systemctl restart pe-puppetserver.service', $legacy_compiler_targets)
}
# PuppetDB is only found on modern compilers, not legacy ones
run_command('systemctl restart pe-puppetdb.service pe-puppetserver.service', $compiler_hosts)
if $compiler_targets {
run_command('systemctl restart pe-puppetserver.service pe-puppetdb.service', $compiler_targets)
}
# Run puppet on all targets again to ensure everything is fully up-to-date
run_task('peadm::puppet_runonce', $all_targets)
Expand Down

0 comments on commit 1ae13c4

Please sign in to comment.