diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-21 19:48:08 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-21 19:48:08 -0200 |
commit | b113edea1ae00c54cf6a9cfdd32cf00b87d2a761 (patch) | |
tree | 9d1e1ec56f198d8c1703fbaa49ec60bdf666328f | |
parent | 11223262cc15864fe4215a6f251ed64954b7988b (diff) | |
download | puppet-mail-b113edea1ae00c54cf6a9cfdd32cf00b87d2a761.tar.gz puppet-mail-b113edea1ae00c54cf6a9cfdd32cf00b87d2a761.tar.bz2 |
Get db data directly from hiera at dovecot
-rw-r--r-- | manifests/dovecot.pp | 6 | ||||
-rw-r--r-- | templates/dovecot/dovecot-sql.conf.erb | 2 |
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. # |