From 2f96093dbf3ac38e8f60da59c46afda10c300ed5 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 15 May 2026 10:08:58 +0200 Subject: [PATCH] CI: Replace Ubuntu 22.04 with 26.04 for ansible-core devel (#12052) Replace Ubuntu 22.04 with 26.04 for devel. --- .azure-pipelines/azure-pipelines.yml | 12 +- .../apache2_module/tasks/actualtest.yml | 7 +- .../cloud_init_data_facts/tasks/main.yml | 1 + .../targets/ejabberd_user/tasks/main.yml | 4 +- .../targets/filesystem/tasks/main.yml | 2 + .../targets/filesystem/tasks/setup.yml | 1 + .../targets/htpasswd/tasks/main.yml | 207 +++++++++--------- tests/integration/targets/mqtt/tasks/main.yml | 2 +- .../setup_postgresql_db/vars/Ubuntu-26.yml | 13 ++ tests/integration/targets/zpool/aliases | 1 + tests/utils/constraints.txt | 1 - 11 files changed, 138 insertions(+), 113 deletions(-) create mode 100644 tests/integration/targets/setup_postgresql_db/vars/Ubuntu-26.yml diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml index 2a28277419..62afba419c 100644 --- a/.azure-pipelines/azure-pipelines.yml +++ b/.azure-pipelines/azure-pipelines.yml @@ -176,8 +176,8 @@ stages: test: alpine/3.23 # - name: Fedora 44 # test: fedora/44 - - name: Ubuntu 22.04 - test: ubuntu/22.04 + - name: Ubuntu 26.04 + test: ubuntu/26.04 - name: Ubuntu 24.04 test: ubuntu/24.04 groups: @@ -272,8 +272,8 @@ stages: test: fedora44 - name: Alpine 3.23 test: alpine323 - - name: Ubuntu 22.04 - test: ubuntu2204 + - name: Ubuntu 26.04 + test: ubuntu2604 - name: Ubuntu 24.04 test: ubuntu2404 groups: @@ -292,8 +292,8 @@ stages: test: fedora43 # - name: Alpine 3.23 # test: alpine323 - # - name: Ubuntu 22.04 - # test: ubuntu2204 + - name: Ubuntu 22.04 + test: ubuntu2204 - name: Ubuntu 24.04 test: ubuntu2404 groups: diff --git a/tests/integration/targets/apache2_module/tasks/actualtest.yml b/tests/integration/targets/apache2_module/tasks/actualtest.yml index 629af4837e..5cff667e6c 100644 --- a/tests/integration/targets/apache2_module/tasks/actualtest.yml +++ b/tests/integration/targets/apache2_module/tasks/actualtest.yml @@ -88,8 +88,11 @@ community.general.apache2_module: name: evasive state: present - # TODO: fix for Debian 13 (Trixie)! - when: ansible_facts.distribution != 'Debian' or ansible_facts.distribution_major_version is version('13', '<') + when: + # TODO: fix for Debian 13 (Trixie)! + - ansible_facts.distribution != 'Debian' or ansible_facts.distribution_major_version is version('13', '<') + # TODO: fix for Ubuntu 26.04! + - ansible_facts.distribution != 'Ubuntu' or ansible_facts.distribution_major_version is version('26', '<') - 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 a8c3973ab0..2f6bf74aea 100644 --- a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml +++ b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml @@ -29,6 +29,7 @@ - not (ansible_facts.distribution == 'Alpine') # TODO: not sure what's wrong here, the module doesn't return what the tests expect - not (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version|int == 13) # TODO: not sure what's wrong here, the module doesn't return what the tests expect - not (ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version|int >= 43) # TODO: not sure what's wrong here, the module doesn't return what the tests expect + - not (ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_major_version|int >= 26) # 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 51e0630e05..5e77e55514 100644 --- a/tests/integration/targets/ejabberd_user/tasks/main.yml +++ b/tests/integration/targets/ejabberd_user/tasks/main.yml @@ -11,11 +11,11 @@ - name: Bail out if not supported ansible.builtin.meta: end_play # TODO: remove Archlinux from the list - # TODO: remove Ubuntu 24.04 (noble) from the list + # TODO: remove Ubuntu 24.04 or newer from the list # TODO: remove Debian 13 (Trixie) from the list when: > ansible_facts.distribution in ('Alpine', 'openSUSE Leap', 'CentOS', 'Fedora', 'Archlinux') - or (ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_release in ['noble']) + or (ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_major_version | int >= 24) or (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version == '13') - name: Remove ejabberd diff --git a/tests/integration/targets/filesystem/tasks/main.yml b/tests/integration/targets/filesystem/tasks/main.yml index 231b141297..68aa02da33 100644 --- a/tests/integration/targets/filesystem/tasks/main.yml +++ b/tests/integration/targets/filesystem/tasks/main.yml @@ -60,6 +60,8 @@ - 'not (ansible_facts.distribution == "Alpine" and item.0.key == "reiserfs")' # reiserfsprogs packages no longer available with Arch Linux - 'not (ansible_facts.distribution == "Archlinux" and item.0.key == "reiserfs")' + # reiserfsprogs packages no longer available with Ubuntu 26.04 + - 'not (item.0.key == "reiserfs" and ansible_facts.distribution == "Ubuntu" and (ansible_facts.distribution_major_version | int >= 26))' # ocfs2 only available on Debian based distributions - 'not (item.0.key == "ocfs2" and ansible_facts.os_family != "Debian")' # Tests use losetup which can not be used inside unprivileged container diff --git a/tests/integration/targets/filesystem/tasks/setup.yml b/tests/integration/targets/filesystem/tasks/setup.yml index 541cfffd65..edf1609ee8 100644 --- a/tests/integration/targets/filesystem/tasks/setup.yml +++ b/tests/integration/targets/filesystem/tasks/setup.yml @@ -74,6 +74,7 @@ when: - ansible_facts.system == 'Linux' - ansible_facts.os_family not in ['Suse', 'RedHat', 'Alpine', 'Archlinux'] + - ansible_facts.distribution != "Ubuntu" or (ansible_facts.distribution_major_version | int < 26) - name: "Install reiserfs progs (FreeBSD)" ansible.builtin.package: diff --git a/tests/integration/targets/htpasswd/tasks/main.yml b/tests/integration/targets/htpasswd/tasks/main.yml index 030f4d19ae..2e3e568e00 100644 --- a/tests/integration/targets/htpasswd/tasks/main.yml +++ b/tests/integration/targets/htpasswd/tasks/main.yml @@ -3,117 +3,122 @@ # 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 passlib - ansible.builtin.pip: - name: passlib - notify: remove passlib +- when: + # passlib is dead and doesn't work with recent bcrypt versions anymore + # (https://foss.heptapod.net/python-libs/passlib/-/work_items/196) + - ansible_facts.distribution != 'Ubuntu' or ansible_facts.distribution_version is version('26.04', '<') + block: + - name: install passlib + ansible.builtin.pip: + name: passlib + notify: remove passlib -- name: add bob (check mode) - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - password: c00lbob - mode: "0644" - check_mode: true - register: add_bob_check + - name: add bob (check mode) + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + password: c00lbob + mode: "0644" + check_mode: true + register: add_bob_check -- name: add bob - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - password: c00lbob - mode: "0644" - register: add_bob + - name: add bob + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + password: c00lbob + mode: "0644" + register: add_bob -- name: add bob (idempotency) - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - password: c00lbob - mode: "0644" - register: add_bob_idempot + - name: add bob (idempotency) + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + password: c00lbob + mode: "0644" + register: add_bob_idempot -- name: update permissions (check mode) - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - password: c00lbob - mode: "0600" - check_mode: true - register: update_perms_check + - name: update permissions (check mode) + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + password: c00lbob + mode: "0600" + check_mode: true + register: update_perms_check -- name: update permissions - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - password: c00lbob - mode: "0600" - register: update_perms + - name: update permissions + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + password: c00lbob + mode: "0600" + register: update_perms -- name: update permissions (idempotency) - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - password: c00lbob - mode: "0600" - register: update_perms_idempot + - name: update permissions (idempotency) + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + password: c00lbob + mode: "0600" + register: update_perms_idempot -- name: add bob new password - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - password: SUPERsecret - mode: "0600" - register: add_bob_newpw + - name: add bob new password + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + password: SUPERsecret + mode: "0600" + register: add_bob_newpw -- name: add bob new password (idempotency) - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - password: SUPERsecret - mode: "0600" - register: add_bob_newpw_idempot + - name: add bob new password (idempotency) + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + password: SUPERsecret + mode: "0600" + register: add_bob_newpw_idempot -- name: test add bob assertions - ansible.builtin.assert: - that: - - add_bob_check is changed - - add_bob is changed - - add_bob_idempot is not changed - - update_perms_check is changed - - update_perms is changed - - update_perms_idempot is not changed - - add_bob_newpw is changed - - add_bob_newpw_idempot is not changed + - name: test add bob assertions + ansible.builtin.assert: + that: + - add_bob_check is changed + - add_bob is changed + - add_bob_idempot is not changed + - update_perms_check is changed + - update_perms is changed + - update_perms_idempot is not changed + - add_bob_newpw is changed + - add_bob_newpw_idempot is not changed -- name: remove bob (check mode) - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - state: absent - mode: "0600" - check_mode: true - register: del_bob_check + - name: remove bob (check mode) + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + state: absent + mode: "0600" + check_mode: true + register: del_bob_check -- name: remove bob - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - state: absent - mode: "0600" - register: del_bob + - name: remove bob + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + state: absent + mode: "0600" + register: del_bob -- name: remove bob (idempotency) - community.general.htpasswd: - path: "{{ htpasswd_path }}" - name: bob - state: absent - mode: "0600" - register: del_bob_idempot + - name: remove bob (idempotency) + community.general.htpasswd: + path: "{{ htpasswd_path }}" + name: bob + state: absent + mode: "0600" + register: del_bob_idempot -- name: test remove bob assertions - ansible.builtin.assert: - that: - - del_bob_check is changed - - del_bob is changed - - del_bob_idempot is not changed + - name: test remove bob assertions + ansible.builtin.assert: + that: + - del_bob_check is changed + - del_bob is changed + - del_bob_idempot is not changed diff --git a/tests/integration/targets/mqtt/tasks/main.yml b/tests/integration/targets/mqtt/tasks/main.yml index ab3c0227f9..aed72ca1ab 100644 --- a/tests/integration/targets/mqtt/tasks/main.yml +++ b/tests/integration/targets/mqtt/tasks/main.yml @@ -11,4 +11,4 @@ - include_tasks: ubuntu.yml when: - ansible_facts.distribution == 'Ubuntu' - - ansible_facts.distribution_release not in ['focal', 'jammy', 'noble'] + - ansible_facts.distribution_major_version is version('20', '<') diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-26.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-26.yml new file mode 100644 index 0000000000..697f2b574d --- /dev/null +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-26.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/18/main/pg_hba.conf" +pg_dir: "/var/lib/postgresql/18/main" +pg_ver: 18 diff --git a/tests/integration/targets/zpool/aliases b/tests/integration/targets/zpool/aliases index 73cd4069d2..ee12b05e97 100644 --- a/tests/integration/targets/zpool/aliases +++ b/tests/integration/targets/zpool/aliases @@ -11,3 +11,4 @@ skip/macos skip/rhel skip/docker skip/alpine # TODO: figure out what goes wrong +skip/ubuntu26.04 # TODO: VM seems to have less disk space than required diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index 1de42c4590..086ca8dafb 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -15,6 +15,5 @@ pyfmg == 0.6.1 # newer versions do not pass current unit tests pytest-mock >= 1.4.0 # needed for mock_use_standalone_module pytest option pyone == 1.1.9 # newer versions do not pass current integration tests cffi >= 1.14.2, != 1.14.3 # Yanked version which older versions of pip will still install: -bcrypt < 4.0.0 # TEMP: restrict to < 4.0.0 since installing 4.0.0 fails on RHEL 8 py-consul < 1.3.0 ; python_version < '3.8' # 1.3.0 dropped support for Python 3.5, 3.6, 3.7 py-consul < 1.5.4 ; python_version < '3.9' # 1.5.4 dropped support for Python 3.8