diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-06-07 22:31:09 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-06-07 22:31:09 -0300 |
commit | eca33108c812283a0e6905934545d3726787b048 (patch) | |
tree | 799a7b6510ea48493ea97e4f4651f57772987a44 | |
parent | 340b703801c3e58ba9f7f211f131f0d5ae068388 (diff) | |
download | puppet-rsyslog-eca33108c812283a0e6905934545d3726787b048.tar.gz puppet-rsyslog-eca33108c812283a0e6905934545d3726787b048.tar.bz2 |
-rw-r--r-- | manifests/init.pp | 33 |
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, - } } |