diff --git a/plans/convert.pp b/plans/convert.pp index 15681676..1ff1771a 100644 --- a/plans/convert.pp +++ b/plans/convert.pp @@ -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)