Fix idempotency around systemd restart 58/55658/1
authorAlex Schultz <aschultz@redhat.com>
Thu, 16 Mar 2017 22:55:27 +0000 (16:55 -0600)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 19 Apr 2017 19:18:40 +0000 (15:18 -0400)
Switch the exec to reload the systemd daemon to only occur when the
puppet module updates the systemd unit file.

Change-Id: Ifb32b67b0a42c9ee1096522f6413d441fad312ee
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
manifests/install.pp

index 2af09c5ff479f429223870ebdb4f880e789c6b6c..56c4909e788f02aea0683a97617122b505e7ab02 100644 (file)
@@ -36,10 +36,11 @@ class opendaylight::install {
       match  => '^Environment.*',
       after  => 'ExecStart=/opt/opendaylight/bin/start',
     }
-    ->
+    ~>
     exec {'reload_systemd_units':
-      command => 'systemctl daemon-reload',
-      path    => '/bin'
+      command     => 'systemctl daemon-reload',
+      path        => '/bin',
+      refreshonly => true,
     }
   }