From 07ce00417d16c55e74708b44585bea08369a33f8 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 31 Aug 2025 16:15:09 +0200 Subject: [PATCH] CI: Add Debian 13 Trixie (#10638) * Add Debian 13 Trixie to CI. * Add adjustments. * Disable one apache2_module test for Debian 13. * Disable ejabberd_user test on Debian 13. * Fix paramiko install. * Skip cloud_init_data_facts on Debian 13. * Fix postgresql setup. * Fix timezone tests. --- .azure-pipelines/azure-pipelines.yml | 6 +++-- .../targets/android_sdk/vars/Debian-11.yml | 6 +++++ .../targets/android_sdk/vars/Debian-12.yml | 6 +++++ .../targets/android_sdk/vars/Debian.yml | 2 +- .../apache2_module/tasks/actualtest.yml | 2 ++ .../cloud_init_data_facts/tasks/main.yml | 1 + .../targets/ejabberd_user/tasks/main.yml | 2 ++ tests/integration/targets/odbc/tasks/main.yml | 4 ++++ .../setup_java_keytool/vars/Debian-13.yml | 8 +++++++ .../targets/setup_paramiko/meta/main.yml | 8 +++++++ .../targets/setup_paramiko/tasks/main.yml | 23 +++++++++++++++++++ .../vars/Debian-13-py3.yml | 13 +++++++++++ .../targets/ssh_config/meta/main.yml | 2 +- .../targets/ssh_config/tasks/main.yml | 7 ------ .../targets/timezone/tasks/main.yml | 6 +++++ 15 files changed, 85 insertions(+), 11 deletions(-) create mode 100644 tests/integration/targets/android_sdk/vars/Debian-11.yml create mode 100644 tests/integration/targets/android_sdk/vars/Debian-12.yml create mode 100644 tests/integration/targets/setup_java_keytool/vars/Debian-13.yml create mode 100644 tests/integration/targets/setup_paramiko/meta/main.yml create mode 100644 tests/integration/targets/setup_paramiko/tasks/main.yml create mode 100644 tests/integration/targets/setup_postgresql_db/vars/Debian-13-py3.yml diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 455d0659b4..374cfe0236 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -339,10 +339,12 @@ stages: parameters: testFormat: devel/linux-community/{0} targets: - - name: Debian Bullseye + - name: Debian 11 Bullseye test: debian-bullseye/3.9 - - name: Debian Bookworm + - name: Debian 12 Bookworm test: debian-bookworm/3.11 + - name: Debian 13 Trixie + test: debian-13-trixie/3.13 - name: ArchLinux test: archlinux/3.13 groups: diff --git a/tests/integration/targets/android_sdk/vars/Debian-11.yml b/tests/integration/targets/android_sdk/vars/Debian-11.yml new file mode 100644 index 0000000000..ddcfaaf1e3 --- /dev/null +++ b/tests/integration/targets/android_sdk/vars/Debian-11.yml @@ -0,0 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +openjdk_pkg: openjdk-17-jre-headless diff --git a/tests/integration/targets/android_sdk/vars/Debian-12.yml b/tests/integration/targets/android_sdk/vars/Debian-12.yml new file mode 100644 index 0000000000..ddcfaaf1e3 --- /dev/null +++ b/tests/integration/targets/android_sdk/vars/Debian-12.yml @@ -0,0 +1,6 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +openjdk_pkg: openjdk-17-jre-headless diff --git a/tests/integration/targets/android_sdk/vars/Debian.yml b/tests/integration/targets/android_sdk/vars/Debian.yml index ddcfaaf1e3..033d50068b 100644 --- a/tests/integration/targets/android_sdk/vars/Debian.yml +++ b/tests/integration/targets/android_sdk/vars/Debian.yml @@ -3,4 +3,4 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -openjdk_pkg: openjdk-17-jre-headless +openjdk_pkg: openjdk-21-jre-headless diff --git a/tests/integration/targets/apache2_module/tasks/actualtest.yml b/tests/integration/targets/apache2_module/tasks/actualtest.yml index 88e063fe92..396c6d9097 100644 --- a/tests/integration/targets/apache2_module/tasks/actualtest.yml +++ b/tests/integration/targets/apache2_module/tasks/actualtest.yml @@ -88,6 +88,8 @@ community.general.apache2_module: name: evasive state: present + # TODO: fix for Debian 13 (Trixie)! + when: ansible_distribution != 'Debian' or ansible_distribution_major_version is version('13', '<') - name: use identifier to enable module, fix for https://github.com/ansible/ansible/issues/33669 community.general.apache2_module: diff --git a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml index 71161603f9..685c2bc1c4 100644 --- a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml +++ b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml @@ -31,6 +31,7 @@ - not (ansible_distribution == "CentOS" and ansible_distribution_major_version|int == 8) # TODO: cannot start service - not (ansible_distribution == 'Archlinux') # TODO: package seems to be broken, cannot be downloaded from mirrors? - not (ansible_distribution == 'Alpine') # TODO: not sure what's wrong here, the module doesn't return what the tests expect + - not (ansible_distribution == 'Debian' and ansible_distribution_major_version|int == 13) # TODO: not sure what's wrong here, the module doesn't return what the tests expect block: - name: setup install cloud-init package: diff --git a/tests/integration/targets/ejabberd_user/tasks/main.yml b/tests/integration/targets/ejabberd_user/tasks/main.yml index d7f1670d06..0e6e2da582 100644 --- a/tests/integration/targets/ejabberd_user/tasks/main.yml +++ b/tests/integration/targets/ejabberd_user/tasks/main.yml @@ -12,9 +12,11 @@ ansible.builtin.meta: end_play # TODO: remove Archlinux from the list # TODO: remove Ubuntu 24.04 (noble) from the list + # TODO: remove Debian 13 (Trixie) from the list when: > ansible_distribution in ('Alpine', 'openSUSE Leap', 'CentOS', 'Fedora', 'Archlinux') or (ansible_distribution == 'Ubuntu' and ansible_distribution_release in ['noble']) + or (ansible_distribution == 'Debian' and ansible_distribution_major_version == '13') - name: Remove ejabberd ansible.builtin.package: diff --git a/tests/integration/targets/odbc/tasks/main.yml b/tests/integration/targets/odbc/tasks/main.yml index af5f57cb2a..8e6e047693 100644 --- a/tests/integration/targets/odbc/tasks/main.yml +++ b/tests/integration/targets/odbc/tasks/main.yml @@ -8,9 +8,13 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later +- debug: + msg: "{{ ansible_os_family }} / {{ ansible_distribution }} / {{ ansible_distribution_major_version }}" + - when: - ansible_os_family != 'Archlinux' # TODO install driver from AUR: https://aur.archlinux.org/packages/psqlodbc - ansible_os_family != 'RedHat' or ansible_distribution_major_version != '7' # CentOS 7 stopped working + - ansible_distribution != 'Debian' or ansible_distribution_major_version != '13' # TODO fix tests for Debian 13 (Trixie)! block: # diff --git a/tests/integration/targets/setup_java_keytool/vars/Debian-13.yml b/tests/integration/targets/setup_java_keytool/vars/Debian-13.yml new file mode 100644 index 0000000000..addf344fe2 --- /dev/null +++ b/tests/integration/targets/setup_java_keytool/vars/Debian-13.yml @@ -0,0 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +keytool_package_names: + - ca-certificates-java + - openjdk-21-jre-headless diff --git a/tests/integration/targets/setup_paramiko/meta/main.yml b/tests/integration/targets/setup_paramiko/meta/main.yml new file mode 100644 index 0000000000..d4a5c7d05a --- /dev/null +++ b/tests/integration/targets/setup_paramiko/meta/main.yml @@ -0,0 +1,8 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +dependencies: + - setup_remote_constraints + - setup_pkg_mgr diff --git a/tests/integration/targets/setup_paramiko/tasks/main.yml b/tests/integration/targets/setup_paramiko/tasks/main.yml new file mode 100644 index 0000000000..dc0be1be35 --- /dev/null +++ b/tests/integration/targets/setup_paramiko/tasks/main.yml @@ -0,0 +1,23 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: Install required libs + pip: + name: + - paramiko + state: present + extra_args: "-c {{ remote_constraints }}" + when: ansible_distribution != 'Debian' or ansible_distribution_major_version is version('13', '<') + +- name: Install required libs (Debian 13+) + package: + name: python3-paramiko + state: present + when: ansible_distribution == 'Debian' and ansible_distribution_major_version is version('13', '>=') diff --git a/tests/integration/targets/setup_postgresql_db/vars/Debian-13-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Debian-13-py3.yml new file mode 100644 index 0000000000..459d159bee --- /dev/null +++ b/tests/integration/targets/setup_postgresql_db/vars/Debian-13-py3.yml @@ -0,0 +1,13 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +postgresql_packages: + - "postgresql" + - "postgresql-common" + - "python3-psycopg2" + +pg_hba_location: "/etc/postgresql/17/main/pg_hba.conf" +pg_dir: "/var/lib/postgresql/17/main" +pg_ver: 17 diff --git a/tests/integration/targets/ssh_config/meta/main.yml b/tests/integration/targets/ssh_config/meta/main.yml index 4cdaaefbaf..5b491449dd 100644 --- a/tests/integration/targets/ssh_config/meta/main.yml +++ b/tests/integration/targets/ssh_config/meta/main.yml @@ -4,5 +4,5 @@ # SPDX-License-Identifier: GPL-3.0-or-later dependencies: - - setup_remote_constraints + - setup_paramiko - setup_remote_tmp_dir diff --git a/tests/integration/targets/ssh_config/tasks/main.yml b/tests/integration/targets/ssh_config/tasks/main.yml index 00f48e36cf..2fefcc568f 100644 --- a/tests/integration/targets/ssh_config/tasks/main.yml +++ b/tests/integration/targets/ssh_config/tasks/main.yml @@ -3,13 +3,6 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -- name: Install required libs - pip: - name: - - paramiko - state: present - extra_args: "-c {{ remote_constraints }}" - - set_fact: output_test_dir: '{{ remote_tmp_dir }}/test_ssh_config' diff --git a/tests/integration/targets/timezone/tasks/main.yml b/tests/integration/targets/timezone/tasks/main.yml index 475f22447d..ff9833aac1 100644 --- a/tests/integration/targets/timezone/tasks/main.yml +++ b/tests/integration/targets/timezone/tasks/main.yml @@ -54,6 +54,12 @@ state: present when: ansible_distribution == 'Archlinux' +- name: make sure util-linux-extra are installed on Debian 13+ + package: + name: util-linux-extra + state: present + when: ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= 13 + - name: make sure tzdata is installed on Alpine package: name: tzdata