summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwadronaut <kwadronaut@leap.se>2014-03-23 03:04:14 +0100
committerkwadronaut <kwadronaut@leap.se>2014-03-23 03:04:14 +0100
commit1890d3562290281450ba6d6552a45caa3a66ba09 (patch)
tree066db6d9e0c7cd3555a5a0a0eba157c6eb8b4c75
parentc4f2489d7c37cc67bcde416be61123c1f70d7cde (diff)
merge with immerda's syslog option and nadirs latest head fixes #5031
for LEAP
-rw-r--r--manifests/base.pp23
-rw-r--r--manifests/deliver.pp7
-rw-r--r--manifests/init.pp13
-rw-r--r--manifests/logrotate.pp2
4 files changed, 33 insertions, 12 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 2b00cff..ffdd510 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -21,6 +21,27 @@ class dovecot::base {
mode => '0755';
}
+ if !$dovecot::use_syslog {
+ file{
+ '/var/log/dovecot':
+ ensure => directory,
+ require => Package['dovecot'],
+ before => Service['dovecot'],
+ owner => dovecot,
+ group => $dovecot::shared_group,
+ mode => '0660';
+ [ '/var/log/dovecot/error.log',
+ '/var/log/dovecot/infos.log' ]:
+ require => Package['dovecot'],
+ before => Service['dovecot'],
+ owner => root,
+ group => $dovecot::shared_group,
+ mode => '0660';
+ }
+
+ include dovecot::logrotate
+ }
+
file {
'/var/log/dovecot':
ensure => directory,
@@ -44,8 +65,6 @@ class dovecot::base {
alias => 'dovecot'
}
- include dovecot::logrotate
-
service{'dovecot':
ensure => running,
enable => true,
diff --git a/manifests/deliver.pp b/manifests/deliver.pp
index da190f1..1aa468e 100644
--- a/manifests/deliver.pp
+++ b/manifests/deliver.pp
@@ -1,11 +1,12 @@
class dovecot::deliver {
include ::dovecot
-
- file { [ '/var/log/dovecot/deliver.log',
- '/var/log/dovecot/deliver-error.log' ]:
+ if !$dovecot::use_syslog {
+ file{ [ '/var/log/dovecot/deliver.log',
+ '/var/log/dovecot/deliver-error.log' ]:
require => Package['dovecot'],
before => Service['dovecot'],
owner => root, group => 12, mode => 0660;
+ }
}
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 29d6da7..8b6c904 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,12 +1,13 @@
# we take rpms from fedora
class dovecot(
- $type = 'some_unkown_type',
- $sqlite = false,
- $pgsql = false,
- $mysql = false,
+ $type = 'some_unkown_type',
+ $sqlite = false,
+ $pgsql = false,
+ $mysql = false,
+ $use_syslog = true,
$nagios_checks = {
- 'imap-hostname' => $fqdn,
- 'pop3-hostname' => $fqdn,
+ 'imap-hostname' => $::fqdn,
+ 'pop3-hostname' => $::fqdn,
},
$munin_checks = true,
$manage_shorewall = true,
diff --git a/manifests/logrotate.pp b/manifests/logrotate.pp
index c86f0f0..4282a5a 100644
--- a/manifests/logrotate.pp
+++ b/manifests/logrotate.pp
@@ -1,6 +1,6 @@
class dovecot::logrotate {
- include logrotate
+ include ::logrotate
augeas {
"logrotate_dovecot":