diff options
author | Micah Anderson <micah@riseup.net> | 2011-09-02 16:31:32 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2011-09-02 16:31:32 -0400 |
commit | efd742c81f629d653b9d9a29a400f37d0a44dee9 (patch) | |
tree | cee307ffd7d294a20ca00870c8806bfe1c7403b6 /manifests/sql.pp | |
parent | 4ddd09c2a38bd6f491f6e3a10035bf2f514ab76b (diff) |
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
Diffstat (limited to 'manifests/sql.pp')
-rw-r--r-- | manifests/sql.pp | 28 |
1 files changed, 12 insertions, 16 deletions
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' } } } |