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

3
4
5
6
7
8
9
10
11
- name: Install EPEL repository
  yum:
    conf_file: '/etc/yum.conf'
    name:
      - epel-release
    state: present
    update_cache: yes
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and use_external_epel)

12
- name: Install ancillary packages for CentOS 7
U-PALLAS\krasinski's avatar
U-PALLAS\krasinski committed
13
14
  yum:
    conf_file: '/etc/yum.conf'
15
    name:
U-PALLAS\krasinski's avatar
U-PALLAS\krasinski committed
16
17
      - libselinux-python
      - python-pip
viscapi's avatar
viscapi committed
18
19
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
- name: Install PostgreSQL {{ external_postgresql_version }} packages for CentOS 7
  yum:
    conf_file: '/etc/yum.conf'
    name: 
      - 'postgresql{{ external_postgresql_version | replace(".", "") }}'
      - 'postgresql{{ external_postgresql_version | replace(".", "") }}-server'
    state: present
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and not use_distribution_postgresql)

- name: Install PostgreSQL 9.2 packages for CentOS 7
  yum:
    conf_file: '/etc/yum.conf'
    name:
      - postgresql
      - postgresql-server
    state: present
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and use_distribution_postgresql)

- name: Install ancillary packages for CentOS 8
viscapi's avatar
viscapi committed
39
40
41
42
43
  dnf:
    conf_file: '/etc/dnf/dnf.conf'
    name:
      - python3-libselinux
      - python3-pip
44
45
46
    state: present
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")

47
48
49
50
- name: Disable the built-in PostgreSQL module
  command: dnf -qy module disable postgresql
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and not use_distribution_postgresql)

51
52
53
54
55
56
57
58
59
60
61
62
63
- name: Install PostgreSQL {{ external_postgresql_version }} packages for CentOS 8
  dnf:
    conf_file: '/etc/dnf/dnf.conf'
    name:
      - 'postgresql{{ external_postgresql_version | replace(".", "") }}'
      - 'postgresql{{ external_postgresql_version | replace(".", "") }}-server'
    state: present
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and not use_distribution_postgresql)

- name: Install PostgreSQL 10 packages for CentOS 8
  dnf:
    conf_file: '/etc/dnf/dnf.conf'
    name:
viscapi's avatar
viscapi committed
64
65
66
      - postgresql
      - postgresql-server
    state: present
67
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and use_distribution_postgresql)
U-PALLAS\krasinski's avatar
U-PALLAS\krasinski committed
68
69

...