Browse Source

default to run on same host as postfixadmin

master
parent
commit
6d258caab7
2 changed files with 6 additions and 4 deletions
  1. +3
    -1
      defaults/main.yaml
  2. +3
    -3
      tasks/auth/sql.yaml

+ 3
- 1
defaults/main.yaml View File

@@ -1,7 +1,9 @@
dovecot_postfixadmin_mysql_host: localhost
dovecot_postfixadmin_mysql_database: postfixadmin
dovecot_postfixadmin_mysql_username: dovecot
vmail_uid: 500
vmail_gid: 500
dovecot_lmtp_inet_listener: false
dovecot_unix_listeners_for_postfix: false
dovecot_unix_listeners_for_postfix: true
dovecot_auth_inet_listener: false
dovecot_auth: sql

+ 3
- 3
tasks/auth/sql.yaml View File

@@ -3,7 +3,7 @@
- name: dovecot sql config
template:
src: dovecot-sql.conf.ext.j2
dest: /etc/dovecot/dovecot-sql.conf.ext.j2
dest: /etc/dovecot/dovecot-sql.conf.ext
notify:
- reload dovecot

@@ -12,6 +12,6 @@
name: "{{dovecot_postfixadmin_mysql_username}}"
password: "{{dovecot_postfixadmin_mysql_password}}"
priv: "{{dovecot_postfixadmin_mysql_database}}.*:SELECT"
host: "{{inventory_hostname}}"
host: "{{dovecot_postfixadmin_mysql_host}}"
state: present
delegate_to: "{{dovecot_postfixadmin_mysql_host}}"
delegate_to: "{{(dovecot_postfixadmin_mysql_host=='localhost')|ternary(inventory_hostname,dovecot_postfixadmin_mysql_host)}}"

Loading…
Cancel
Save