summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp33
1 files changed, 17 insertions, 16 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 902182e..65b996f 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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,
- }
}