diff options
author | Steffen Zieger <me@saz.sh> | 2012-04-15 14:11:31 -0700 |
---|---|---|
committer | Steffen Zieger <me@saz.sh> | 2012-04-15 14:11:31 -0700 |
commit | c044800d5fe722454911686fd399088280172d1b (patch) | |
tree | dff6982b003360ba5be5acc93bbf963ae620c3d0 /manifests | |
parent | 482623e806c9db0b7fb75f0e9235e7618b4b6c9e (diff) | |
parent | cf9d8d113de24031bc8ef28c8f45c946325f89ad (diff) |
Merge pull request #5 from Whopper92/add_FreeBSD_support
Adding support for FreeBSD
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/client.pp | 22 | ||||
-rw-r--r-- | manifests/config.pp | 8 | ||||
-rw-r--r-- | manifests/imfile.pp | 2 | ||||
-rw-r--r-- | manifests/install.pp | 4 | ||||
-rw-r--r-- | manifests/params.pp | 34 | ||||
-rw-r--r-- | manifests/server.pp | 2 |
6 files changed, 42 insertions, 30 deletions
diff --git a/manifests/client.pp b/manifests/client.pp index 7af38ec..ce882b5 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -7,15 +7,15 @@ class rsyslog::client ( $server = 'log' ) inherits rsyslog { - file { $rsyslog::params::client_conf: - ensure => present, - owner => root, - group => root, - content => $custom_config ? { - '' => template("${module_name}/client.conf.erb"), - default => template($custom_config), - }, - require => Class['rsyslog::config'], - notify => Class['rsyslog::service'], - } + file { $rsyslog::params::client_conf: + ensure => present, + owner => root, + group => $rsyslog::params::run_group, + content => $custom_config ? { + '' => template("${module_name}/client.conf.erb"), + default => template($custom_config), + }, + require => Class['rsyslog::config'], + notify => Class['rsyslog::service'], + } } diff --git a/manifests/config.pp b/manifests/config.pp index cc63292..aa06535 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,7 +1,7 @@ class rsyslog::config { file { $rsyslog::params::rsyslog_d: owner => root, - group => root, + group => $rsyslog::params::run_group, purge => true, recurse => true, force => true, @@ -11,7 +11,7 @@ class rsyslog::config { file { $rsyslog::params::rsyslog_conf: owner => root, - group => root, + group => $rsyslog::params::run_group, ensure => file, content => template("${module_name}/rsyslog.conf.erb"), require => Class["rsyslog::install"], @@ -20,7 +20,7 @@ class rsyslog::config { file { $rsyslog::params::rsyslog_default: owner => root, - group => root, + group => $rsyslog::params::run_group, ensure => file, source => "puppet:///modules/rsyslog/rsyslog_default", require => Class["rsyslog::install"], @@ -29,7 +29,7 @@ class rsyslog::config { file { $rsyslog::params::spool_dir: owner => root, - group => root, + group => $rsyslog::params::run_group, ensure => directory, require => Class["rsyslog::install"], notify => Class["rsyslog::service"], diff --git a/manifests/imfile.pp b/manifests/imfile.pp index 0e109d9..64e6e2f 100644 --- a/manifests/imfile.pp +++ b/manifests/imfile.pp @@ -11,7 +11,7 @@ define rsyslog::imfile( file { "${rsyslog::params::rsyslog_d}${name}.conf": ensure => file, owner => 'root', - group => 'root', + group => $rsyslog::params::run_group, content => template('rsyslog/imfile.erb'), require => Class['rsyslog::install'], notify => Class['rsyslog::service'], diff --git a/manifests/install.pp b/manifests/install.pp index 5521264..e0601bd 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,9 +1,9 @@ class rsyslog::install { package { $rsyslog::params::rsyslog_package_name: - ensure => latest, + ensure => $rsyslog::params::package_status, } package { $rsyslog::params::relp_package_name: - ensure => latest, + ensure => $rsyslog::params::package_status } } diff --git a/manifests/params.pp b/manifests/params.pp index cb6b1b2..37c40ce 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -3,28 +3,40 @@ class rsyslog::params { ubuntu, debian: { $rsyslog_package_name = 'rsyslog' $relp_package_name = 'rsyslog-relp' + $package_status = 'latest' $rsyslog_d = '/etc/rsyslog.d/' $rsyslog_conf = '/etc/rsyslog.conf' $rsyslog_default = '/etc/default/rsyslog' + $run_user = 'root' + $run_group = 'root' + $log_user = 'root' + $log_group = 'adm' $spool_dir = '/var/spool/rsyslog/' $service_name = 'rsyslog' $client_conf = "${rsyslog_d}client.conf" $server_conf = "${rsyslog_d}server.conf" } + freebsd: { + $rsyslog_package_name = 'rsyslog5' + $relp_package_name = 'rsyslog5-relp' + $package_status = 'present' + $rsyslog_d = '/etc/syslog.d/' + $rsyslog_conf = '/etc/syslog.conf' + $rsyslog_default = '/etc/defaults/syslogd' + $run_user = 'root' + $run_group = 'wheel' + $log_user = 'root' + $log_group = 'wheel' + $spool_dir = '/var/spool/syslog/' + $service_name = 'syslogd' + $client_conf = "${rsyslog_d}client.conf" + $server_conf = "${rsyslog_d}server.conf" + } + + default: { fail("Unsupported platform: ${::operatingsystem}") } } - # - # Internal variables - # - - # Drop privileges to this user and group - $run_user = 'root' - $run_group = 'root' - - # User and group of log files - $log_user = 'root' - $log_group = 'adm' } diff --git a/manifests/server.pp b/manifests/server.pp index c714bd1..f5d7e88 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -9,7 +9,7 @@ class rsyslog::server ( file { $rsyslog::params::server_conf: ensure => present, owner => root, - group => root, + group => $rsyslog::params::run_group, content => $custom_config ? { '' => template("${module_name}/server.conf.erb"), default => template($custom_config), |