Skip to content

Commit

Permalink
Make accommodations for different Debian versions for python-apt pack…
Browse files Browse the repository at this point in the history
…age.
  • Loading branch information
Ianvdl authored and vibhorkumar123 committed Apr 30, 2024
1 parent 7e27091 commit 3b89a2f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion roles/install_dbserver/tasks/validate_install_dbserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,21 @@
- ansible_os_family == 'RedHat'
- pg_version|int > 10

- name: Install python-apt package
- name: Install python-apt package for Debian 9/10
ansible.builtin.package:
name: python-apt
state: present
when:
- ansible_os_family == 'Debian'
- ansible_distribution_major_version in ['9', '10']

- name: Install python3-apt package for Debian 11/12
ansible.builtin.package:
name: python3-apt
state: present
when:
- ansible_os_family == 'Debian'
- ansible_distribution_major_version in ['11', '12']

- name: Set package list for PG Debian
ansible.builtin.set_fact:
Expand Down

0 comments on commit 3b89a2f

Please sign in to comment.