Skip to content

Commit 22328b4

Browse files
author
Steffy Fort
committed
Unit_file: Add notify_service
1 parent ae5dfe5 commit 22328b4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

manifests/unit_file.pp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
# @param daemon_reload
6565
# call `systemd::daemon-reload` to ensure that the modified unit file is loaded
6666
#
67+
# @param notify_service
68+
# Notify service if systemd file is changed
69+
#
6770
# @example manage unit file + service
6871
# systemd::unit_file { 'foo.service':
6972
# content => file("${module_name}/foo.service"),
@@ -88,7 +91,8 @@
8891
Optional[Boolean] $hasstatus = undef,
8992
Boolean $selinux_ignore_defaults = false,
9093
Hash[String[1], Any] $service_parameters = {},
91-
Boolean $daemon_reload = true
94+
Boolean $daemon_reload = true,
95+
Boolean $notify_service = true,
9296
) {
9397
include systemd
9498

@@ -152,7 +156,9 @@
152156
}
153157
Service[$name] -> File["${path}/${name}"]
154158
} else {
155-
File["${path}/${name}"] ~> Service[$name]
159+
if $notify_service {
160+
File["${path}/${name}"] ~> Service[$name]
161+
}
156162

157163
if $daemon_reload {
158164
Systemd::Daemon_reload[$name] ~> Service[$name]

0 commit comments

Comments
 (0)