BBlack has submitted this change and it was merged.

Change subject: add central systemctl daemon-reload exec
......................................................................


add central systemctl daemon-reload exec

Change-Id: Ie55a14c0d81873dd4ddee1230e538798991e59e5
---
M modules/base/manifests/init.pp
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp
index d014e12..55aac5f 100644
--- a/modules/base/manifests/init.pp
+++ b/modules/base/manifests/init.pp
@@ -145,6 +145,19 @@
     }
 }
 
+class base::systemd {
+    # When setting up service definitions with custom unit files
+    #  in e.g. /etc/systemd/system/foo.service, the file definition
+    #  should have:
+    #     notify => Exec['systemctl-daemon-reload']
+    #  and the service definition should have:
+    #     require => Exec['systemctl-daemon-reload']
+    exec { 'systemctl-daemon-reload':
+        command => '/bin/systemctl daemon-reload',
+        refreshonly => 'true',
+    }
+}
+
 class base {
     include apt
 
@@ -208,6 +221,9 @@
     include role::trebuchet
     include nrpe
 
+    if $::initsystem == 'systemd' {
+        include base::systemd
+    }
 
     # include base::monitor::host.
     # if $nagios_contact_group is set, then use it

-- 
To view, visit https://gerrit.wikimedia.org/r/187701
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie55a14c0d81873dd4ddee1230e538798991e59e5
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to