Skip to content

Commit 7ac0fe0

Browse files
committed
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.
1 parent 00915e3 commit 7ac0fe0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manifests/dropin_file.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@
8181
File[$full_filename] ~> Service <| title == $unit or name == $unit |>
8282

8383
if $daemon_reload {
84-
Systemd::Daemon_reload[$unit] ~> Service <| title == $unit or name == $unit |>
84+
Systemd::Daemon_reload[$unit] -> Service <| title == $unit or name == $unit |>
8585
}
8686

8787
if $unit =~ /\.service$/ {
8888
$short_service_name = regsubst($unit, /\.service$/, '')
8989
File[$full_filename] ~> Service <| title == $short_service_name or name == $short_service_name |>
9090

9191
if $daemon_reload {
92-
Systemd::Daemon_reload[$unit] ~> Service <| title == $short_service_name or name == $short_service_name |>
92+
Systemd::Daemon_reload[$unit] -> Service <| title == $short_service_name or name == $short_service_name |>
9393
}
9494
}
9595
}

0 commit comments

Comments
 (0)