diff --git a/tasks/extensions/dev_headers.yml b/tasks/extensions/dev_headers.yml index 4cd86c8c..cc6e41e1 100644 --- a/tasks/extensions/dev_headers.yml +++ b/tasks/extensions/dev_headers.yml @@ -8,3 +8,13 @@ cache_valid_time: "{{apt_cache_valid_time | default (3600)}}" notify: - restart postgresql + when: ansible_os_family == "Debian" + +- name: PostgreSQL | Extensions | Make sure the development headers are installed | RedHat + yum: + name: "postgresql{{postgresql_version_terse}}-devel" + state: present + when: ansible_os_family == "RedHat" + notify: + - restart postgresql + diff --git a/tasks/extensions/postgis.yml b/tasks/extensions/postgis.yml index d03a0604..243c9468 100644 --- a/tasks/extensions/postgis.yml +++ b/tasks/extensions/postgis.yml @@ -12,3 +12,25 @@ - "postgresql-{{postgresql_version}}-postgis-scripts" notify: - restart postgresql + when: ansible_os_family == "Debian" + +- name: PostgreSQL | Extensions | Make sure the postgis extensions are installed | RedHat + yum: + name: "{{item}}" + state: present + with_items: + - "postgis2_{{postgresql_version_terse}}" + - "postgis2_{{postgresql_version_terse}}-client" + - "postgis2_{{postgresql_version_terse}}-utils" + notify: + - restart postgresql + when: ansible_os_family == "RedHat" + +- name: PostgreSQL | Extensions | Make sure the postgis development files are installed | RedHat + yum: + name: "{{item}}" + state: present + with_items: + - "postgis2_{{postgresql_version_terse}}-devel" + - "postgis2_{{postgresql_version_terse}}-docs" + when: (ansible_os_family == "RedHat") and (postgresql_ext_install_dev_headers)