Skip to content

Commit f64b6ae

Browse files
committed
(bug) reload the service after the deletion of old unit file
1 parent 4065ce2 commit f64b6ae

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

manifests/server/config.pp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,13 @@
224224
# - $datadir
225225
# - @extra_systemd_config
226226

227+
exec { 'restart-systemd':
228+
command => 'systemctl daemon-reload',
229+
refreshonly => true,
230+
path => '/bin:/usr/bin:/usr/local/bin',
231+
}
232+
227233
if (versioncmp($facts['puppetversion'], '6.1.0') < 0) {
228-
exec { 'restart-systemd':
229-
command => 'systemctl daemon-reload',
230-
refreshonly => true,
231-
path => '/bin:/usr/bin:/usr/local/bin',
232-
}
233234
$systemd_notify = [Exec['restart-systemd'], Class['postgresql::server::service']]
234235
}
235236
else {
@@ -261,6 +262,7 @@
261262
'old-systemd-override':
262263
ensure => absent,
263264
path => "/etc/systemd/system/${service_name}.service",
265+
notify => [Exec['restart-systemd'], Class['postgresql::server::service']],
264266
;
265267
}
266268
}

0 commit comments

Comments
 (0)