diff --git a/tasks/postgresql_org_repo.yml b/tasks/postgresql_org_repo.yml index 17bdd65..50fcbb1 100644 --- a/tasks/postgresql_org_repo.yml +++ b/tasks/postgresql_org_repo.yml @@ -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', '>=')