Open EmptyByte opened 5 months ago
distribution_postgresql_support_map:
redhat8: [10, 12, 13, 15, 16]
redhat9: [13, 15, 16]
- name: Check if PostgreSQL version is supported on distribution
ansible.builtin.assert:
that: postgresql_version | int in distribution_postgresql_support_map[ansible_facts['distribution'] | lower + ansible_facts['distribution_major_version']]
success_msg: "PostgreSQL version {{ postgresql_version }} is supported on {{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_major_version'] }}"
fail_msg: "PostgreSQL version {{ postgresql_version }} is not supported on {{ ansible_facts['distribution'] | lower }} {{ ansible_facts['distribution_major_version'] }}"
quiet: false
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
Nice role! Should replace the official RHEL system_role for PostgreSQL imo (have a look at it).
For packages vars I would suggest :
and then you can define
postgresql_version
in defaults but this means validating if each version exists