Use dnf on EL 8+.

This commit is contained in:
Andrea Dell'Amico 2024-08-08 19:03:24 +02:00
parent f2103225f1
commit 715e2b4c49
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 10 additions and 1 deletions

View File

@ -40,7 +40,16 @@
- ansible_distribution_file_variety == "RedHat"
tags: ['postgresql', 'postgresql_repo', 'postgres_client']
block:
- name: postgresql_org_repo | Install the pgsql pgdg repository
- name: postgresql_org_repo | Install the pgsql pgdg repository on EL 7
ansible.builtin.yum:
name: "{{ psql_el_pgdg_repo_url }}"
state: present
disable_gpg_check: true
when: ansible_distribution_major_version is version_compare('8', '<')
- name: postgresql_org_repo | Install the pgsql pgdg repository on EL 8+
ansible.builtin.dnf:
name: "{{ psql_el_pgdg_repo_url }}"
state: present
disable_gpg_check: true
when: ansible_distribution_major_version is version_compare('8', '>=')