From efd742c81f629d653b9d9a29a400f37d0a44dee9 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 2 Sep 2011 16:31:32 -0400 Subject: the new version of dovecot (version 2) has a number of differences from version 1, so I added a $version class parameter (defaulting to 2) so we can have different configurations for the different versions. for version 2, debian does have different sql packages, so we test the above variable before attempting to install the packages, rather than test for the $operatingsystem in sql.pp --- manifests/sql.pp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'manifests/sql.pp') diff --git a/manifests/sql.pp b/manifests/sql.pp index fc9a864..528fd94 100644 --- a/manifests/sql.pp +++ b/manifests/sql.pp @@ -11,21 +11,17 @@ class dovecot::sql { owner => root, group => 0, mode => 0600; } - 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: {} + if $dovecot::mysql { + include ::dovecot::sql::mysql + } + if $dovecot::pgsql { + include ::dovecot::sql::pgsql + } + if $dovecot::sqlite { + include ::dovecot::sql::sqlite + } + + if $operatingsystem == 'Debian' { + File['/etc/dovecot-sql.conf'] { path => '/etc/dovecot/dovecot-sql.conf' } } } -- cgit v1.2.3