From 2541e06afe1999dd5e81d4b9d0a670c579b6e460 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sat, 30 Sep 2017 22:21:07 +0200 Subject: [PATCH] Notify service when the underlying file changes or the service changes --- modules/roles/manifests/mirror_health.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/roles/manifests/mirror_health.pp b/modules/roles/manifests/mirror_health.pp index a00f0a4e5..2a0413bb0 100644 --- a/modules/roles/manifests/mirror_health.pp +++ b/modules/roles/manifests/mirror_health.pp @@ -14,6 +14,7 @@ define roles::mirror_health ( owner => 'root', group => 'root', mode => '0555', + notify => Service["mirror-health-${check_service}"], } file { "/etc/systemd/system/mirror-health-${check_service}.service": @@ -21,7 +22,7 @@ define roles::mirror_health ( group => 'root', mode => '0444', content => template('roles/mirror-health.service.erb'), - notify => Exec['systemctl daemon-reload'], + notify => [Exec['systemctl daemon-reload'], Service["mirror-health-${check_service}"]], } file { "/etc/systemd/system/multi-user.target.wants/mirror-health-${check_service}.service": -- 2.20.1