Fix the EL repository name.

This commit is contained in:
Andrea Dell'Amico 2024-08-08 18:56:24 +02:00
parent 0c35eea79e
commit f2103225f1
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
3 changed files with 8 additions and 6 deletions

View File

@ -38,7 +38,7 @@ postgresql_pkgs:
psql_el_install_scl_version: false
psql_el_install_from_pgdg_repo: true
psql_el_pgdg_repo_url: "https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm"
psql_el_pgdg_repo_url: "https://download.postgresql.org/pub/repos/yum/reporpms/EL-{{ ansible_distribution_major_version }}-x86_64/pgdg-redhat-repo-latest.noarch.rpm"
psql_scl_base_dir: '/var/opt/rh/rh-postgresql{{ psql_version }}/lib/pgsql'
psql_el_base_dir: '/var/lib/pgsql/{{ psql_version }}'
psql_el_data_dir: '{{ psql_el_base_dir }}/data'

View File

@ -13,6 +13,10 @@
- ansible_distribution_file_variety == "Debian"
- psql_restart_after_wal_enabling
- name: Flush the APT cache
ansible.builtin.apt:
update_cache: true
- name: Restart postgresql
service: name='postgresql-{{ psql_version }}' state=restarted
when: ansible_distribution_file_variety == "RedHat"

View File

@ -30,11 +30,9 @@
signed_by: "{{ postgresql_deb_repo_key }}"
state: present
enabled: true
register: postgresql_org_repo
- name: postgresql_org_repo | Update the apt cache
ansible.builtin.apt:
update_cache: yes
when: postgresql_org_repo is changed
notify: Flush the APT cache
- name: postgresql_org_repo | Postgresql repo flush handlers
ansible.builtin.meta: flush_handlers
- name: postgresql_org_repo | Manage the EL repository
when: