Fixed declaration errors when syslog::client and syslog::server are included to same node.
This commit is contained in:
parent
6e8e1ca3d6
commit
38dd36690f
1 changed files with 13 additions and 12 deletions
|
@ -55,6 +55,13 @@ class syslog::common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { "/var/log/all.log":
|
||||||
|
ensure => present,
|
||||||
|
mode => "0640",
|
||||||
|
owner => "root",
|
||||||
|
group => $group,
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install syslog client
|
# Install syslog client
|
||||||
|
@ -90,14 +97,6 @@ class syslog::client::syslogd {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/var/log/all.log":
|
|
||||||
ensure => present,
|
|
||||||
mode => "0640",
|
|
||||||
owner => "root",
|
|
||||||
group => $group,
|
|
||||||
notify => Service["syslogd"],
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/etc/syslog.conf":
|
file { "/etc/syslog.conf":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => template("syslog/syslog.conf.$operatingsystem.erb",
|
content => template("syslog/syslog.conf.$operatingsystem.erb",
|
||||||
|
@ -126,6 +125,7 @@ class syslog::client::syslogd {
|
||||||
"openbsd" => "pkill -HUP -u _syslogd",
|
"openbsd" => "pkill -HUP -u _syslogd",
|
||||||
default => undef,
|
default => undef,
|
||||||
},
|
},
|
||||||
|
require => File["/var/log/all.log"],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -162,15 +162,16 @@ class syslog::client::rsyslog {
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "rsyslog":
|
service { "rsyslog":
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
enable => true,
|
||||||
start => $operatingsystem ? {
|
start => $operatingsystem ? {
|
||||||
"openbsd" => $operatingsystemrelease ? {
|
"openbsd" => $operatingsystemrelease ? {
|
||||||
/4\.[1-8]/ => "pkill syslogd; /usr/local/sbin/rsyslogd -c 4 -x -i /var/run/syslog.pid",
|
/4\.[1-8]/ => "pkill syslogd; /usr/local/sbin/rsyslogd -c 4 -x -i /var/run/syslog.pid",
|
||||||
default => undef,
|
default => undef,
|
||||||
},
|
},
|
||||||
default => undef,
|
default => undef,
|
||||||
},
|
},
|
||||||
|
require => File["/var/log/all.log"],
|
||||||
}
|
}
|
||||||
|
|
||||||
if $operatingsystem == "OpenBSD" and $operatingsystemrelease !~ /4\.[1-8]/ {
|
if $operatingsystem == "OpenBSD" and $operatingsystemrelease !~ /4\.[1-8]/ {
|
||||||
|
@ -234,7 +235,7 @@ class syslog::common::standalone inherits syslog::common {
|
||||||
require => File["/srv/log"],
|
require => File["/srv/log"],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/var/log/all.log":
|
File["/var/log/all.log"] {
|
||||||
ensure => link,
|
ensure => link,
|
||||||
target => "/srv/log/all.log",
|
target => "/srv/log/all.log",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue