From 9ffd7faafb9ecf7c29db94cf29a525cc853c74e3 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 16 Mar 2022 10:30:58 +0100 Subject: [PATCH] puppet agent timer: depend on network/start it if offline Two changes: With adding network-online.target as dependency we ensure that the network is really available. That might not be the case for the network.target. In case the system has no proper network manager, network-online.target isn't available. For that situation we still depend on network.target. Also we now have Wants= defined. That will start the targets if the agent is started. We had a similar discussion upstream: https://github.com/puppetlabs/puppet/pull/8893 --- templates/agent/systemd.puppet-run.service.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/agent/systemd.puppet-run.service.erb b/templates/agent/systemd.puppet-run.service.erb index 4d4486461..c5e98bd27 100644 --- a/templates/agent/systemd.puppet-run.service.erb +++ b/templates/agent/systemd.puppet-run.service.erb @@ -3,7 +3,8 @@ # [Unit] Description=Systemd Timer Service for Puppet Agent -After=network.target +Wants=network.target network-online.target +After=network.target network-online.target [Service] Type=oneshot