From 164c32951224cc42c149cab419e330521f020e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Mon, 21 Sep 2020 10:33:24 -0400 Subject: [PATCH] run Puppet agent from systemd only after network is brought up Using `After` ensures proper ordering between the Puppet service and the machine's networking. We could also have used `Wants` or `Requires` but, according to the `systemd.unit(5)` manpage, `After` only ensure *ordering*, while `Wants` and `Requires` actually *trigger* units. In other words, `After` ensures that `puppet-run` will be started after networking is up, but will not *necessarily* run when networking is up, nor will it attempt to bring up networking when ran. Closes: #764 --- templates/agent/systemd.puppet-run.service.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/agent/systemd.puppet-run.service.erb b/templates/agent/systemd.puppet-run.service.erb index 20339ca4..4d448646 100644 --- a/templates/agent/systemd.puppet-run.service.erb +++ b/templates/agent/systemd.puppet-run.service.erb @@ -3,6 +3,7 @@ # [Unit] Description=Systemd Timer Service for Puppet Agent +After=network.target [Service] Type=oneshot