From e7ef4818e866dd4c871b317efae9fe513a43d4ce Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 25 Aug 2011 16:01:04 -0400 Subject: 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 --- manifests/sql.pp | 24 ++++++++++++++++-------- 1 file 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: {} } } -- cgit v1.2.3