Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing postgis.yml doesn't include yum / RedHat variation #258 #479

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}"

Expand Down
6 changes: 6 additions & 0 deletions tasks/install_rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down