summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2009-12-14 22:35:38 +0100
committermh <mh@immerda.ch>2009-12-14 22:35:38 +0100
commitea88b2d0597527467a0013de3c1c173d5e4d136f (patch)
tree88476899472b4e781b76139ba230076e76d448d9
parent6893d541eb220e90f3eff30274fc3d03e994485e (diff)
add sqlite support, refactor how sql is done, add readme
-rw-r--r--README14
-rw-r--r--manifests/init.pp4
-rw-r--r--manifests/sql.pp9
-rw-r--r--manifests/sql/sqlite.pp6
4 files changed, 30 insertions, 3 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..a5b068f
--- /dev/null
+++ b/README
@@ -0,0 +1,14 @@
+dovecot
+-------
+
+Variables:
+----------
+
+$dovecot_sql_sqlite:
+ - Whether sqlite support should be included
+
+$dovecot_sql_mysql:
+ - Whether Mysql support should be included
+
+$dovecot_sql_pgsql:
+ - Whether PostgreSQL support should be included
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'],
+ }
+}