|
@@ -16,12 +16,14 @@
|
16
|
16
|
tags:
|
17
|
17
|
- dependencies
|
18
|
18
|
|
19
|
|
-- name: Set postgres password
|
20
|
|
- command: sudo -u {{ db_admin_username }} psql -d {{ db_admin_username }} -c "ALTER USER postgres with password '{{ db_admin_password }}';"
|
|
19
|
+- name: Set password for PostgreSQL admin user
|
|
20
|
+ become: true
|
|
21
|
+ become_user: postgres
|
|
22
|
+ postgresql_user: name={{ db_admin_username }} password={{ db_admin_password }} encrypted=yes
|
21
|
23
|
notify: import sql postfix
|
22
|
24
|
|
23
|
25
|
- name: Create database user for mail server
|
24
|
|
- postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ mail_db_username }} password="{{ mail_db_password }}" state=present
|
|
26
|
+ postgresql_user: login_host=localhost login_user={{ db_admin_username }} login_password="{{ db_admin_password }}" name={{ mail_db_username }} password="{{ mail_db_password }}" encrypted=yes state=present
|
25
|
27
|
notify: import sql postfix
|
26
|
28
|
|
27
|
29
|
- name: Create database for mail server
|