repos.yml 788 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---

- name: Install external PostgreSQL repository for CentOS 7
  yum:
    conf_file: '/etc/yum.conf'
    name: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm 
    state: present
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and not use_distribution_postgresql)

- name: Install external PostgreSQL repository for CentOS 8
  dnf:
    conf_file: '/etc/dnf/dnf.conf'
    name: https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
    state: present
    disable_gpg_check: yes
  when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and not use_distribution_postgresql)

...