]> gitweb.fluxo.info Git - puppet-rsyslog.git/commitdiff
Better dependency chain master
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Jun 2016 01:31:09 +0000 (22:31 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Jun 2016 01:31:09 +0000 (22:31 -0300)
manifests/init.pp

index 902182e3228cb0028694eb5ffb0a18222b0837c1..65b996f6ef5e7c85d6013bf76059f89c7c9d4178 100644 (file)
@@ -3,10 +3,26 @@ class rsyslog {
     ensure  => present,
   }
 
+  exec { 'restart-rsyslog':
+    command     => '/usr/sbin/service rsyslog restart',
+    user        => root,
+    refreshonly => true,
+  }
+
+  # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741496
+  file { '/etc/systemd/system/syslog.service':
+    force   => true,
+    ensure  => '/lib/systemd/system/rsyslog.service',
+    owner   => 'root',
+    group   => 'root',
+    require => Package['rsyslog'],
+    notify  => Exec['restart-rsyslog'],
+  }
+
   service { 'rsyslog' :
     ensure  => running,
     enable  => true,
-    require => Package['rsyslog'],
+    require => File['/etc/systemd/system/syslog.service'],
   }
 
   file { '/etc/rsyslog.d/00-anon.conf':
@@ -18,19 +34,4 @@ class rsyslog {
     require => Package['rsyslog'],
     notify  => Service['rsyslog'],
   }
-
-  # See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741496
-  file { '/etc/systemd/system/syslog.service':
-    force   => true,
-    ensure  => '/lib/systemd/system/rsyslog.service',
-    owner   => 'root',
-    group   => 'root',
-    require => Package['rsyslog'],
-    notify  => Exec['restart-rsyslog'],
-  }
-
-  exec { 'restart-rsyslog':
-    command     => '/usr/sbin/service rsyslog restart',
-    refreshonly => true,
-  }
 }