Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ name: CI
push:
branches:
- development
- decrease-ansible-deprecation-5-0-0
schedule:
- cron: "0 4 * * 4"

Expand Down Expand Up @@ -48,7 +49,6 @@ jobs:
# - distro: rockylinux9
- distro: debian11
- distro: debian12
- distro: ubuntu2004
- distro: ubuntu2204
- distro: ubuntu2404

Expand All @@ -61,10 +61,21 @@ jobs:
- name: Set up Python.
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: '3.12'

- name: Install test dependencies.
run: pip3 install "ansible>10,<12" molecule molecule-plugins[docker] docker
- name: Upgrade pip & install deps
run: |
python -m pip install --upgrade pip wheel setuptools
# Meta-package Ansible 10/11 (include ansible-core ≥2.20)
pip install "ansible>10,<12"
# Testing tools
pip install "molecule" "molecule-plugins[docker]" docker ansible-compat

- name: Show versions
run: |
python -V
ansible --version
molecule --version

- name: Run Molecule tests.
run: molecule -v test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Icon
test
*.retry
ANXS-postgresql.code-workspace
tests/roles
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ An example how to include this role as a task:

#### Compatibility matrix

| Distribution / PostgreSQL | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| ------------------------- | :--------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
| Debian 11.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Debian 12.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Rockylinux 8.x | :no_entry: | :warning: | :warning: | :warning: | :warning: | :warning: | :warning: |
| Rockylinux 9.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :warning: |
| Ubuntu 20.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Ubuntu 22.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Ubuntu 24.04.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Distribution / PostgreSQL | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| ------------------------- | :--------: | :--------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
| Debian 11.x | :no_entry: | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Debian 12.x | :no_entry: | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Rockylinux 8.x | :no_entry: | :no_entry: | :warning: | :warning: | :warning: | :warning: | :warning: |
| Rockylinux 9.x | :no_entry: | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :warning: |
| Ubuntu 22.04.x | :no_entry: | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Ubuntu 24.04.x | :no_entry: | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |


- :white_check_mark: - works fine
Expand Down
16 changes: 15 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,22 @@ postgresql_install_repository: true
# APT settings
postgresql_apt_key_id: "ACCC4CF8"
postgresql_apt_key_url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc"
postgresql_apt_repository: "deb http://apt.postgresql.org/pub/repos/apt/ {{ ansible_distribution_release }}-pgdg main {{ postgresql_version }}"
# postgresql_apt_keyring: "/usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg"

# repsoitory base
postgresql_apt_repo_base: "https://apt.postgresql.org/pub/repos/apt"
postgresql_apt_repo_components: "main"

# (codename + -pgdg)
postgresql_apt_suite: "{{ ansible_facts['distribution_release'] | default('') }}-pgdg"

# Ligne de dépôt finale (utilise les variables ci-dessus)
postgresql_apt_repository: >-
deb [signed-by={{ postgresql_apt_keyring }}]
{{ postgresql_apt_repo_base }} {{ postgresql_apt_suite }} {{ postgresql_apt_repo_components }}

# Pin-Priority of PGDG repository
postgresql_apt_pin_enabled: true
postgresql_apt_pin_priority: 500

# YUM repository locations
Expand Down
4 changes: 4 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
name: "{{ postgresql_service_name }}"
state: restarted
enabled: yes

- name: Reload systemd daemon
ansible.builtin.command: systemctl daemon-reload
become: true
2 changes: 0 additions & 2 deletions molecule/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ The default distribution is ubuntu2204. You can override th with setting the env
* fedora40
* debian11
* debian12
* ubuntu2004
* ubuntu2204
* ubuntu2404

Expand Down Expand Up @@ -47,7 +46,6 @@ $ ls -1 tests/ | grep vars
vars.Debian.11.yml
vars.Debian.12.yml
vars.Fedora.40.yml
vars.Ubuntu.20.yml
vars.Ubuntu.22.yml
vars.Ubuntu.24.yml
vars.yml
Expand Down
6 changes: 6 additions & 0 deletions molecule/default/collections.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
collections:
- name: community.postgresql
# pin if you want:
# version: ">=3.8.0,<5.0.0"
- name: community.general
10 changes: 0 additions & 10 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ lint: |
# yamllint .
# ansible-lint
platforms:
- name: postgresql-12
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
pre_build_image: true
cgroupns_mode: host
command: ${MOLECULE_DOCKER_COMMAND:-""}
- name: postgresql-13
image: "geerlingguy/docker-${MOLECULE_DISTRO:-debian11}-ansible:latest"
volumes:
Expand Down Expand Up @@ -66,8 +58,6 @@ provisioner:
converge: ${MOLECULE_PLAYBOOK:-../../tests/playbook.yml}
inventory:
host_vars:
postgresql-12:
postgresql_version: 12
postgresql-13:
postgresql_version: 13
postgresql-14:
Expand Down
Loading