diff --git a/defaults/main.yml b/defaults/main.yml index ba7c41e9..d2d8ce58 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -49,7 +49,7 @@ postgresql_postgis_release_compatibility: 13: "3.1" postgresql_ext_postgis_version: "{{ postgresql_postgis_release_compatibility.get(postgresql_version) }}" -postgresql_ext_postgis_version_terse: "{{ postgresql_ext_postgis_version | replace('.','') }}" +postgresql_ext_postgis_version_terse: "{{ postgresql_ext_postgis_version | replace('.', '') }}" # Short version of the postgresql_ext_postgis_version, used in some path and filenames postgresql_ext_postgis_deps: - libgeos-c1 @@ -832,6 +832,7 @@ postgresql_yum_repository_url: "http://yum.postgresql.org" postgresql_pgdg_repository_url: "https://download.postgresql.org/pub/repos/yum/" # YUM (RedHat, CentOS, etc.) baseurl/gpgkey +postgresql_common_yum_repository_baseurl: "{{ postgresql_yum_repository_url }}/common/{{ ansible_os_family | lower }}/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}" postgresql_yum_repository_baseurl: "{{ postgresql_yum_repository_url }}/{{ postgresql_version }}/{{ ansible_os_family | lower }}/rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}" postgresql_yum_repository_gpgkey: "{{ postgresql_pgdg_repository_url }}/RPM-GPG-KEY-PGDG-{{ postgresql_version_terse }}" diff --git a/tasks/install_rhel.yml b/tasks/install_rhel.yml index f8a755bf..0e42e756 100644 --- a/tasks/install_rhel.yml +++ b/tasks/install_rhel.yml @@ -19,6 +19,12 @@ enabled: yes when: postgresql_install_repository + - name: PostgreSQL | Make sure the dependencies are installed | yum + yum: + name: ["python-psycopg2", "python-pycurl", "glibc-common","libselinux-python"] + state: present + update_cache: yes + - name: PostgreSQL | Disable postgresql module (necessary for RHEL8+) command: cmd: dnf module disable postgresql -y diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 857791a2..ee37bd86 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -6,6 +6,10 @@ postgresql_cluster_name: "data" postgresql_service_name: "postgresql-{{ postgresql_version }}" +postgresql_ext_postgis_deps: + - "postgis{{ postgresql_ext_postgis_version_terse }}_{{ postgresql_version }}" + - "postgis{{ postgresql_ext_postgis_version_terse }}_{{ postgresql_version }}-utils" + postgresql_varlib_directory_name: "pgsql" # Used to execute initdb