[Mageia-sysadm] [595] - do not restart when puppet.conf is updated, or this stop puppet while updating itself

root at mageia.org root at mageia.org
Tue Dec 14 12:30:03 CET 2010


Revision: 595
Author:   misc
Date:     2010-12-14 12:30:03 +0100 (Tue, 14 Dec 2010)
Log Message:
-----------
- do not restart when puppet.conf is updated, or this stop puppet while updating itself

Modified Paths:
--------------
    puppet/modules/puppet/manifests/init.pp

Modified: puppet/modules/puppet/manifests/init.pp
===================================================================
--- puppet/modules/puppet/manifests/init.pp	2010-12-14 11:15:25 UTC (rev 594)
+++ puppet/modules/puppet/manifests/init.pp	2010-12-14 11:30:03 UTC (rev 595)
@@ -7,10 +7,17 @@
     
         service { puppet:
             ensure => running,
-            subscribe => [ Package[puppet], File["/etc/puppet/puppet.conf"]]
+            hasstatus => true,
+            subscribe => [ Package[puppet]]
         }
 
-        file { "/etc/puppet/puppet.conf":
+        exec { "service puppet reload":
+            refreshonly => true,
+            subscribe => [ File["puppet.conf"] ],
+        }
+
+        file { "puppet.conf":
+            path => "/etc/puppet/puppet.conf",
             ensure => present,
             owner => root,
             group => root,
@@ -33,7 +40,7 @@
         service { puppetmaster:
             ensure => running,
             path => "/etc/init.d/puppetmaster",
-            subscribe => [ Package[puppet-server], File["/etc/puppet/puppet.conf"]]
+            subscribe => [ Package[puppet-server], File["puppet.conf"]]
         }
 
         file { "extdata":
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20101214/86d5ae0a/attachment.html>


More information about the Mageia-sysadm mailing list