|
1 | | -# file: postgresql/tasks/install.yml |
| 1 | +# file: postgresql/tasks/install_apt.yml |
2 | 2 |
|
3 | 3 | # The standard ca-certs are needed because without them apt_key will fail to |
4 | 4 | # validate www.postgresql.org (or probably any other source). |
5 | | -- name: PostgreSQL | Make sure the CA certificates are available |
| 5 | +- name: PostgreSQL | Make sure the CA certificates are available | apt |
6 | 6 | apt: |
7 | 7 | pkg: ca-certificates |
8 | 8 | state: present |
9 | 9 |
|
10 | | -- name: PostgreSQL | Add PostgreSQL repository apt-key |
| 10 | +- name: PostgreSQL | Add PostgreSQL repository apt-key | apt |
11 | 11 | apt_key: |
12 | 12 | id: "{{ postgresql_apt_key_id }}" |
13 | 13 | url: "{{ postgresql_apt_key_url }}" |
14 | 14 | state: present |
15 | 15 | when: postgresql_apt_key_url and postgresql_apt_key_id and postgresql_install_repository |
16 | 16 |
|
17 | | -- name: PostgreSQL | Add PostgreSQL repository |
| 17 | +- name: PostgreSQL | Add PostgreSQL repository | apt |
18 | 18 | apt_repository: |
19 | 19 | repo: "{{ postgresql_apt_repository }}" |
20 | 20 | state: present |
21 | 21 | when: postgresql_apt_repository | default('') != '' and postgresql_install_repository |
22 | 22 |
|
23 | | -- name: PostgreSQL | Add PostgreSQL repository preferences |
| 23 | +- name: PostgreSQL | Add PostgreSQL repository preferences | apt |
24 | 24 | template: |
25 | 25 | src: etc_apt_preferences.d_apt_postgresql_org_pub_repos_apt.pref.j2 |
26 | 26 | dest: /etc/apt/preferences.d/apt_postgresql_org_pub_repos_apt.pref |
27 | 27 | when: postgresql_apt_pin_priority and postgresql_install_repository |
28 | 28 |
|
29 | | -- name: PostgreSQL | Make sure the dependencies are installed |
| 29 | +- name: PostgreSQL | Make sure the dependencies are installed | apt |
30 | 30 | apt: |
31 | 31 | pkg: "{{item}}" |
32 | 32 | state: present |
33 | 33 | update_cache: yes |
34 | 34 | cache_valid_time: "{{apt_cache_valid_time | default (3600)}}" |
35 | 35 | with_items: "{{postgresql_apt_dependencies}}" |
36 | 36 |
|
37 | | -- name: PostgreSQL | Install PostgreSQL |
| 37 | +- name: PostgreSQL | Install PostgreSQL | apt |
38 | 38 | apt: |
39 | 39 | name: "{{item}}" |
40 | 40 | state: present |
|
47 | 47 | - "postgresql-client-{{postgresql_version}}" |
48 | 48 | - "postgresql-contrib-{{postgresql_version}}" |
49 | 49 |
|
50 | | -- name: PostgreSQL | PGTune |
| 50 | +- name: PostgreSQL | PGTune | apt |
51 | 51 | apt: |
52 | 52 | name: pgtune |
53 | 53 | state: present |
|
0 commit comments