Adjust package lists per Debian version

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:26 -04:00
parent 4b0a4ae73c
commit 71b6da6555
1 changed files with 16 additions and 4 deletions

View File

@ -1,13 +1,25 @@
---
- name: install patroni packages via apt
apt:
name:
- set_fact:
package_list:
- python3-psycopg2
- python-psycopg2
- python3-kazoo
- python-psycopg2
- python-kazoo
- patroni
- postgresql-11
when: debian_version|int <= 10
- set_fact:
package_list:
- python3-psycopg2
- python3-kazoo
- patroni
- postgresql-11
when: debian_version|int >= 11
- name: install patroni packages via apt
apt:
name: "{{ package_list }}"
state: latest
update-cache: yes