forked from ANXS/postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_yum.yml
37 lines (32 loc) · 1.04 KB
/
install_yum.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# file: postgresql/tasks/install_yum.yml
# The standard ca-certs are needed because without them apt_key will fail to
# validate www.postgresql.org (or probably any other source).
- name: PostgreSQL | Make sure the CA certificates are available
yum:
name: ca-certificates
state: present
- name: PostgreSQL | Add PostgreSQL repository
yum:
name: "{{ postgresql_yum_repository_url }}"
state: present
- name: PostgreSQL | Make sure the dependencies are installed
yum:
name: "{{ item }}"
state: present
update_cache: yes
with_items: ["python-psycopg2", "python-pycurl", "glibc-common"]
- name: PostgreSQL | Install PostgreSQL
yum:
name: "{{ item }}"
state: present
environment: "{{ postgresql_env }}"
with_items:
- "postgresql{{ postgresql_version_terse }}-server"
- "postgresql{{ postgresql_version_terse }}"
- "postgresql{{ postgresql_version_terse }}-contrib"
- name: PostgreSQL | PGTune
yum:
name: pgtune
state: present
environment: "{{ postgresql_env }}"
when: postgresql_pgtune