summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/dovecot.pp6
-rw-r--r--templates/dovecot/dovecot-sql.conf.erb2
2 files changed, 7 insertions, 1 deletions
diff --git a/manifests/dovecot.pp b/manifests/dovecot.pp
index c4f7b4b..3cb09b7 100644
--- a/manifests/dovecot.pp
+++ b/manifests/dovecot.pp
@@ -1,4 +1,10 @@
class mail::dovecot {
+
+ $database_user = hiera('postfixadmin_database_user', 'postfix'),
+ $database_host = hiera('postfixadmin_database_host', 'localhost'),
+ $database_name = hiera('postfixadmin_database_name', 'postfix'),
+ $database_password = hiera('postfixadmin_database_password', ''),
+
# Dovecot
service { "dovecot":
ensure => running,
diff --git a/templates/dovecot/dovecot-sql.conf.erb b/templates/dovecot/dovecot-sql.conf.erb
index 37c41e5..1e93a2b 100644
--- a/templates/dovecot/dovecot-sql.conf.erb
+++ b/templates/dovecot/dovecot-sql.conf.erb
@@ -56,7 +56,7 @@ driver = mysql
# connect = /etc/dovecot/authdb.sqlite
#
#connect = dbname=virtual user=virtual
-connect = host=<%= scope.lookupvar('mail::postfixadmin::database_host') %> dbname=<%= scope.lookupvar('mail::postfixadmin::database_name') %> user=<%= scope.lookupvar('mail::postfixadmin::database_user') %> password=<%= scope.lookupvar('mail::postfixadmin::database_password') %>
+connect = host=<%= @database_host %> dbname=<%= @database_name %> user=<%= @database_user %> password=<%= @database_password %>
# Default password scheme.
#