BBlack has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/187701

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, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/187701/1

diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp
index d014e12..4ce9e09 100644
--- a/modules/base/manifests/init.pp
+++ b/modules/base/manifests/init.pp
@@ -145,6 +145,20 @@
     }
 }
 
+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 *if* the service is set up to subscribe to the unit file for
+    #  automatic restarts via puppet, the service definition should have:
+    #     subscribe => Exec['systemctl-daemon-reload']
+    exec { 'systemctl-daemon-reload':
+        command => '/bin/systemctl daemon-reload',
+        refreshonly => 'true',
+    }
+}
+
 class base {
     include apt
 
@@ -208,6 +222,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: newchange
Gerrit-Change-Id: Ie55a14c0d81873dd4ddee1230e538798991e59e5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>

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

Reply via email to