|
@@ -11,19 +11,17 @@
|
11
|
11
|
|
12
|
12
|
- name: Create database user for mail server
|
13
|
13
|
mysql_user: user={{ mail_mysql_username }} password={{ mail_mysql_password }} state=present priv="mailserver.*:ALL"
|
|
14
|
+ notify: import mysql postfix
|
14
|
15
|
|
15
|
16
|
- name: Create database for mail server
|
16
|
17
|
mysql_db: name={{ mail_mysql_database }} state=present
|
|
18
|
+ notify: import mysql postfix
|
17
|
19
|
|
18
|
|
-- name: copy over mailserver sql
|
|
20
|
+- name: Copy import.sql
|
19
|
21
|
template: src=mailserver.sql.j2 dest=/etc/postfix/import.sql owner=root group=root mode=0600
|
20
|
|
- tags: import_mysql_postfix
|
|
22
|
+ notify: import mysql postfix
|
21
|
23
|
|
22
|
|
-- name: import mysql postfix
|
23
|
|
- mysql_db: name={{ mail_mysql_database }} state=import target=/etc/postfix/import.sql
|
24
|
|
- tags: import_mysql_postfix
|
25
|
|
-
|
26
|
|
-- name: Copy Postfix config files into place
|
|
24
|
+- name: Copy main.cf
|
27
|
25
|
template: src=etc_postfix_main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root
|
28
|
26
|
notify: restart postfix
|
29
|
27
|
|