|
@@ -1,28 +1,25 @@
|
1
|
|
-- name: Install Postfix 9.1 and related packages for distributions other than Ubuntu Trusty
|
2
|
|
- apt: pkg={{ item }} state=installed
|
3
|
|
- with_items:
|
4
|
|
- - libsasl2-modules
|
5
|
|
- - postfix
|
6
|
|
- - postfix-pcre
|
7
|
|
- - postfix-pgsql
|
8
|
|
- - postgresql-9.1
|
9
|
|
- - postgrey
|
10
|
|
- - python-psycopg2
|
11
|
|
- - sasl2-bin
|
12
|
|
- when: ansible_distribution_release != 'trusty'
|
|
1
|
+- name: Install Postgres 9.1 on older distributions
|
|
2
|
+ apt: pkg=postgresql-9.1 state=present
|
|
3
|
+ when: ansible_distribution_release != 'trusty' and ansible_distribution_release != 'jessie'
|
|
4
|
+
|
|
5
|
+- name: Install Postgres 9.3 on Ubuntu Trusty
|
|
6
|
+ apt: pkg=postgresql-9.3 state=present
|
|
7
|
+ when: ansible_distribution_release == 'trusty'
|
|
8
|
+
|
|
9
|
+- name: Install Postgres 9.4 on Debian Jessie
|
|
10
|
+ apt: pkg=postgresql-9.4 state=present
|
|
11
|
+ when: ansible_distribution_release == 'jessie'
|
13
|
12
|
|
14
|
|
-- name: Install Postfix 9.3 and related packages for Ubuntu Trusty
|
|
13
|
+- name: Install Postfix and related packages
|
15
|
14
|
apt: pkg={{ item }} state=installed
|
16
|
15
|
with_items:
|
17
|
16
|
- libsasl2-modules
|
18
|
17
|
- postfix
|
19
|
18
|
- postfix-pcre
|
20
|
19
|
- postfix-pgsql
|
21
|
|
- - postgresql-9.3
|
22
|
20
|
- postgrey
|
23
|
21
|
- python-psycopg2
|
24
|
22
|
- sasl2-bin
|
25
|
|
- when: ansible_distribution_release == 'trusty'
|
26
|
23
|
|
27
|
24
|
- name: Set postgres password
|
28
|
25
|
command: sudo -u {{ db_admin_username }} psql -d {{ db_admin_username }} -c "ALTER USER postgres with password '{{ db_admin_password }}';"
|