summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp4
-rw-r--r--manifests/sql.pp9
-rw-r--r--manifests/sql/sqlite.pp6
3 files changed, 16 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 3739c07..f0f4b29 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -6,6 +6,10 @@
class dovecot {
include dovecot::base
+ if $dovecot_sql_sqlite or $dovecot_sql_pgsql or $dovecot_sql_mysql {
+ include dovecot::sql
+ }
+
if $use_shorewall {
include shorewall::rules::pop3
include shorewall::rules::imap
diff --git a/manifests/sql.pp b/manifests/sql.pp
index 779bd3a..4969d88 100644
--- a/manifests/sql.pp
+++ b/manifests/sql.pp
@@ -1,5 +1,4 @@
class dovecot::sql {
- include ::dovecot
file{'/etc/dovecot-sql.conf':
source => [ "puppet://$server/modules/site-dovecot/sql/${fqdn}/dovecot-sql.conf",
"puppet://$server/modules/site-dovecot/sql/${dovecot_type}/dovecot-sql.conf",
@@ -11,9 +10,13 @@ class dovecot::sql {
owner => root, group => 0, mode => 0600;
}
- if ($dovecot_sql_type=='mysql'){
+ if $dovecot_sql_mysql{
include ::dovecot::sql::mysql
- } else {
+ }
+ if $dovecot_sql_pqsql{
include ::dovecot::sql::pgsql
}
+ if $dovecot_sql_sqlite{
+ include ::dovecot::sql::sqlite
+ }
}
diff --git a/manifests/sql/sqlite.pp b/manifests/sql/sqlite.pp
new file mode 100644
index 0000000..bc07fb7
--- /dev/null
+++ b/manifests/sql/sqlite.pp
@@ -0,0 +1,6 @@
+class dovecot::sql::sqlite {
+ package{'dovecot-sqlite':
+ ensure => installed,
+ before => File['/etc/dovecot-sql.conf'],
+ }
+}