summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2011-08-25 16:01:04 -0400
committerMicah Anderson <micah@riseup.net>2011-08-25 16:01:04 -0400
commite7ef4818e866dd4c871b317efae9fe513a43d4ce (patch)
tree0e1c4c5a91bfd24d04946068f2dd77238939cd13
parent8a39fe6efb7533cf5b31ca7af74a057610c2f4f1 (diff)
debian doesn't have different packages for the different database drivers to dovecot so we case out based on the $operatingsystem to determine if we include those packages, or not.
Additionally, the dovecot config on Debian is in /etc/dovecot, so we override the dovecot-sql.conf resource to specify that location
-rw-r--r--manifests/sql.pp24
1 files changed, 16 insertions, 8 deletions
diff --git a/manifests/sql.pp b/manifests/sql.pp
index a231239..fc9a864 100644
--- a/manifests/sql.pp
+++ b/manifests/sql.pp
@@ -11,13 +11,21 @@ class dovecot::sql {
owner => root, group => 0, mode => 0600;
}
- if $dovecot::mysql {
- include ::dovecot::sql::mysql
- }
- if $dovecot::pgsql {
- include ::dovecot::sql::pgsql
- }
- if $dovecot::sqlite {
- include ::dovecot::sql::sqlite
+ case $operatingsystem {
+ centos: {
+ if $dovecot::mysql {
+ include ::dovecot::sql::mysql
+ }
+ if $dovecot::pgsql {
+ include ::dovecot::sql::pgsql
+ }
+ if $dovecot::sqlite {
+ include ::dovecot::sql::sqlite
+ }
+ }
+ debian: {
+ File['/etc/dovecot-sql.conf'] { path => '/etc/dovecot/dovecot-sql.conf' }
+ }
+ default: {}
}
}