Skip to content

Commit 176b474

Browse files
authored
Merge pull request #578 from conscribtor/drop-unsupported-dependencies-and-options
Drop unsupported Python and OS versions
2 parents a389942 + ed0719a commit 176b474

33 files changed

+52
-2857
lines changed

.github/workflows/ci.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
path: 'postgresql'
2828

29-
- name: Set up Python 3.
29+
- name: Set up Python.
3030
uses: actions/setup-python@v5
3131
with:
3232
python-version: '3.x'
@@ -50,20 +50,21 @@ jobs:
5050
- distro: debian12
5151
- distro: ubuntu2004
5252
- distro: ubuntu2204
53+
- distro: ubuntu2404
5354

5455
steps:
5556
- name: Check out the codebase.
5657
uses: actions/checkout@v4
5758
with:
5859
path: 'postgresql'
5960

60-
- name: Set up Python 3.
61+
- name: Set up Python.
6162
uses: actions/setup-python@v5
6263
with:
6364
python-version: '3.x'
6465

6566
- name: Install test dependencies.
66-
run: pip3 install ansible molecule molecule-plugins[docker] docker
67+
run: pip3 install "ansible>9,<10" molecule molecule-plugins[docker] docker
6768

6869
- name: Run Molecule tests.
6970
run: molecule -v test

README.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,19 @@ An example how to include this role as a task:
5454

5555
#### Compatibility matrix
5656

57-
| Distribution / PostgreSQL | 11 | 12 | 13 | 14 | 15 | 16 |
58-
| ------------------------- | :--------: | :----------------: | :----------------: | :----------------: | :----------------: | :-------------: |
57+
| Distribution / PostgreSQL | 11 | 12 | 13 | 14 | 15 | 16 |
58+
| ------------------------- | :--------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
5959
| Debian 11.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
6060
| Debian 12.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
61-
| Rockylinux 8.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
61+
| Rockylinux 8.x | :no_entry: | :warning: | :warning: | :warning: | :warning: | :warning: |
6262
| Rockylinux 9.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
6363
| Ubuntu 20.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
6464
| Ubuntu 22.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
6565

6666

67-
- :white_check_mark: - tested, works fine
68-
- :warning: - not for production use
69-
- :grey_question: - will work in the future (help out if you can)
70-
- :interrobang: - maybe works, not tested
71-
- :no_entry: - has reached End of Life (EOL)
67+
- :white_check_mark: - works fine
68+
- :warning: - has known issues
69+
- :no_entry: - is unsupported and/or EOL
7270

7371

7472
#### Variables

defaults/main.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,6 @@ postgresql_yum_repository_gpgkey: "{{ postgresql_pgdg_repository_url }}/keys/PGD
830830
postgresql_dnf_repository_baseurl: "{{ postgresql_yum_repository_url }}/{{ postgresql_version }}/fedora/fedora-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}"
831831
postgresql_dnf_repository_gpgkey: "{{ postgresql_yum_repository_gpgkey }}"
832832

833-
postgresql_apt_py3_dependencies: ["python3-psycopg2", "locales"]
834-
postgresql_apt_py2_dependencies: ["python-psycopg2", "python-pycurl", "locales"]
835-
postgresql_apt_dependencies: "{{ postgresql_apt_py3_dependencies if 'python3' in ansible_python_interpreter|default('') else postgresql_apt_py2_dependencies }}"
833+
postgresql_apt_dependencies: ["python3-psycopg2", "locales"]
836834

837835
postgresql_hide_passwords: false

meta/main.yml

+29-29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# file: postgresql/meta/main.yml
23

34
galaxy_info:
@@ -6,42 +7,41 @@ galaxy_info:
67
namespace: anxs
78
role_name: postgresql
89
description: "Install and configure PostgreSQL, dependencies, extensions, databases and users."
9-
min_ansible_version: 2.4.0
10+
min_ansible_version: 2.12.0
1011
license: MIT
1112

1213
platforms:
13-
- name: Debian
14-
versions:
15-
- stretch
16-
- buster
14+
- name: Debian
15+
versions:
16+
- bullseye
17+
- bookworm
1718

18-
- name: EL
19-
versions:
20-
- 7
21-
- 8
19+
- name: EL
20+
versions:
21+
- "8"
22+
- "9"
2223

23-
- name: Ubuntu
24-
versions:
25-
- bionic
26-
- focal
27-
- xenial
28-
- jammy
24+
- name: Ubuntu
25+
versions:
26+
- focal
27+
- jammy
28+
- noble
2929

30-
- name: Fedora
31-
versions:
32-
- 37
30+
- name: Fedora
31+
versions:
32+
- "40"
3333

3434
galaxy_tags:
35-
- postgresql
36-
- postgres
37-
- database
38-
- database:sql
39-
- sql
40-
- postgis
41-
- debian
42-
- centos
43-
- redhat
44-
- fedora
45-
- ubuntu
35+
- postgresql
36+
- postgres
37+
- database
38+
- database:sql
39+
- sql
40+
- postgis
41+
- debian
42+
- rockylinux
43+
- redhat
44+
- fedora
45+
- ubuntu
4646

4747
dependencies: []

molecule/README.md

+8-19
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ The default tested versions are postgresql 12, 13, 14, 15 and 16 on Debian 11. L
1111

1212
The default distribution is ubuntu2204. You can override th with setting the environment variable MOLECULE_DISTRO to one of:
1313

14-
* centos7
15-
* centos8
16-
* fedora37
17-
* debian9
18-
* debian10
14+
* fedora40
1915
* debian11
20-
* ubuntu1604
21-
* ubuntu1804
16+
* debian12
2217
* ubuntu2004
2318
* ubuntu2204
19+
* ubuntu2404
2420

2521
Manual execution of the molecule tests with the distro of your liking. Examples:
2622

@@ -37,7 +33,7 @@ Prior to the testing, molecule runs the prepare.yml playbook to:
3733
* Create a user called `ansible`, with the default group membership of either `wheel` (CentOS, Fedora), or `sudo` (Debian, ubuntu)
3834
* Install a couple of packages that Jeff Geerling did not install in his container images, that are needed in order to test the role properly
3935

40-
The main file ./molecule/default/molecule.yml sets up versions to test from 10 to 13.
36+
The main file ./molecule/default/molecule.yml sets up versions to test from 12 to 16.
4137

4238
## Tests
4339

@@ -48,26 +44,19 @@ The playbooks read variables from two files. One common vars file, and one with
4844

4945
```bash
5046
$ ls -1 tests/ | grep vars
51-
vars.CentOS.7.yml
52-
vars.CentOS.8.yml
53-
vars.Debian.10.yml
5447
vars.Debian.11.yml
55-
vars.Debian.9.yml
56-
vars.Debian.yml
57-
vars.Fedora.37.yml
58-
vars.Ubuntu.16.yml
59-
vars.Ubuntu.18.yml
48+
vars.Debian.12.yml
49+
vars.Fedora.40.yml
6050
vars.Ubuntu.20.yml
6151
vars.Ubuntu.22.yml
52+
vars.Ubuntu.24.yml
6253
vars.yml
6354
```
6455

65-
The main difference, currently, is which python version to use.
66-
6756
## Local installation of molecule
6857

6958
```bash
70-
pip install molecule molecule-docker
59+
pip install molecule molecule-plugins[docker]
7160
```
7261

7362
## Examples

0 commit comments

Comments
 (0)