repman-io/repman

View on GitHub
ansible/roles/postgresql/tasks/extensions/contrib.yml

Summary

Maintainability
Test Coverage
# file: postgresql/tasks/extensions/contrib.yml

- name: PostgreSQL | Extensions | Make sure the postgres contrib extensions are installed | Debian
  apt:
    name: "postgresql-contrib-{{ postgresql_version }}"
    state: present
    update_cache: yes
    cache_valid_time: "{{ apt_cache_valid_time | default (3600) }}"
  when: ansible_os_family == "Debian"
  notify:
    - restart postgresql

- name: PostgreSQL | Extensions | Make sure the postgres contrib extensions are installed | RedHat
  yum:
    name: "postgresql{{ postgresql_version_terse }}-contrib"
    state: present
  when: ansible_pkg_mgr == "yum" and ansible_distribution == "RedHat"
  notify:
    - restart postgresql

- name: PostgreSQL | Extensions | Make sure the postgres contrib extensions are installed | Fedora
  dnf:
    name: "postgresql{{postgresql_version_terse}}-contrib"
    state: present
  when: ansible_pkg_mgr == "dnf" and ansible_distribution == "Fedora"
  notify:
    - restart postgresql