---
- name: Install PostgreSQL on {{ ansible_distribution }}-{{ ansible_distribution_major_version }}
  include: roles/postgresql/tasks/postgresql_{{ ansible_pkg_mgr }}{{ ansible_distribution_major_version }}.yml
  tags: [db, postgresql]
  when: ansible_os_family == "RedHat"

- name: Install PostgreSQL on {{ ansible_distribution }}-{{ ansible_distribution_major_version }}
  include: roles/postgresql/tasks/postgresql_{{ ansible_pkg_mgr }}.yml
  tags: [db, postgresql]
  when: ansible_os_family == "Debian"


---
- name: Install PostgreSQL on {{ ansible_distribution }}-{{ ansible_distribution_major_version }}
  include: postgresql_{{ ansible_pkg_mgr }}{{ ansible_distribution_major_version }}.yml
  tags: [db, postgresql]
  when: ansible_os_family == "RedHat"

- name: Install PostgreSQL on {{ ansible_distribution }}-{{ ansible_distribution_major_version }}
  include: postgresql_{{ ansible_pkg_mgr }}.yml
  tags: [db, postgresql]
  when: ansible_os_family == "Debian"

Fix postgresql task include when using as galaxy dependency
Fix postgresql task include when using as galaxy dependency

Error:
```
FAILED! => {"failed": true, "reason": "the file_name '...roles/postgresql/tasks/postgresql_apt.yml' does not exist, or is not readable"}
```
