From 7ac0fe0002411fd149d135fbb0959e9a71a4bb0e Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Mon, 29 Jan 2024 13:15:47 +0100 Subject: [PATCH] fix: refresh service only based on the drop-in file Since multiple drop-in files of the same unit notify the same Systemd::Daemon_reload resource, changing a drop in file without notify_service still triggers a service refresh if at least one other drop-in file has notify_service set (default) regardless of it being changed. Therefore the Systemd::Daemon_reload should only be ordered before the Service but not notify it. --- manifests/dropin_file.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/dropin_file.pp b/manifests/dropin_file.pp index 6229444e..6b685f22 100644 --- a/manifests/dropin_file.pp +++ b/manifests/dropin_file.pp @@ -81,7 +81,7 @@ File[$full_filename] ~> Service <| title == $unit or name == $unit |> if $daemon_reload { - Systemd::Daemon_reload[$unit] ~> Service <| title == $unit or name == $unit |> + Systemd::Daemon_reload[$unit] -> Service <| title == $unit or name == $unit |> } if $unit =~ /\.service$/ { @@ -89,7 +89,7 @@ File[$full_filename] ~> Service <| title == $short_service_name or name == $short_service_name |> if $daemon_reload { - Systemd::Daemon_reload[$unit] ~> Service <| title == $short_service_name or name == $short_service_name |> + Systemd::Daemon_reload[$unit] -> Service <| title == $short_service_name or name == $short_service_name |> } } }