packages.yml 862 Bytes
Newer Older
U-PALLAS\krasinski's avatar
U-PALLAS\krasinski committed
1
2
---

3
4
5
6
- name: Print PostgreSQL version
  debug:
    msg: '{{ postgresql_version | replace(".", "") }}'

viscapi's avatar
viscapi committed
7
- name: Install PostgreSQL {{ postgresql_version }} packages for CentOS 7
U-PALLAS\krasinski's avatar
U-PALLAS\krasinski committed
8
9
10
11
12
  yum:
    conf_file: '/etc/yum.conf'
    name: 
      - libselinux-python
      - python-pip
13
14
      - 'postgresql{{ postgresql_version | replace(".", "") }}'
      - 'postgresql{{ postgresql_version | replace(".", "") }}-server'
U-PALLAS\krasinski's avatar
U-PALLAS\krasinski committed
15
    state: present
viscapi's avatar
viscapi committed
16
17
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")

viscapi's avatar
viscapi committed
18
- name: Install PostgreSQL 10.6 packages for CentOS 8
viscapi's avatar
viscapi committed
19
20
21
22
23
24
25
26
27
  dnf:
    conf_file: '/etc/dnf/dnf.conf'
    name:
      - python3-libselinux
      - python3-pip
      - postgresql
      - postgresql-server
    state: present
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
U-PALLAS\krasinski's avatar
U-PALLAS\krasinski committed
28
29

...