From 21122e926bf7be6a95f4142d95f61aef24c0117b Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 12 Oct 2025 08:48:50 +0200 Subject: [PATCH] Remove Python 2 specific parts from integration tests (#10897) * Remove Python 2 specific parts from integration tests. * Remove more constraints. --- .../targets/apache2_mod_proxy/tasks/main.yml | 2 +- .../targets/archive/tasks/main.yml | 48 ------------------- .../cloud_init_data_facts/tasks/main.yml | 3 -- .../targets/decompress/handlers/main.yml | 9 ---- .../targets/decompress/tasks/main.yml | 27 +---------- .../targets/filesystem/tasks/main.yml | 5 -- .../targets/filesystem/tasks/setup.yml | 4 +- .../targets/setup_etcd3/tasks/main.yml | 19 ++------ .../targets/setup_etcd3/vars/RedHat-7.yml | 6 --- .../targets/setup_etcd3/vars/Suse-py3.yml | 8 ---- .../targets/setup_openldap/tasks/main.yml | 9 +--- .../targets/setup_openssl/tasks/main.yml | 20 ++------ .../setup_postgresql_db/tasks/main.yml | 18 ++----- .../vars/{Alpine-py3.yml => Alpine.yml} | 0 .../vars/{Archlinux-py3.yml => Archlinux.yml} | 0 .../vars/{Debian-11-py3.yml => Debian-11.yml} | 0 .../vars/{Debian-12-py3.yml => Debian-12.yml} | 0 .../vars/{Debian-13-py3.yml => Debian-13.yml} | 0 .../setup_postgresql_db/vars/Debian-8.yml | 13 ----- .../vars/FreeBSD-11-py3.yml | 17 ------- .../setup_postgresql_db/vars/FreeBSD-11.yml | 2 +- .../vars/FreeBSD-12.0-py3.yml | 17 ------- .../setup_postgresql_db/vars/FreeBSD-12.0.yml | 6 +-- .../vars/FreeBSD-12.1-py3.yml | 17 ------- .../setup_postgresql_db/vars/FreeBSD-12.1.yml | 2 +- .../setup_postgresql_db/vars/RedHat-py3.yml | 13 ----- .../setup_postgresql_db/vars/RedHat.yml | 3 +- .../setup_postgresql_db/vars/Ubuntu-12.yml | 13 ----- .../setup_postgresql_db/vars/Ubuntu-14.yml | 13 ----- .../vars/Ubuntu-16-py3.yml | 13 ----- .../setup_postgresql_db/vars/Ubuntu-16.yml | 2 +- .../vars/{Ubuntu-18-py3.yml => Ubuntu-18.yml} | 0 .../vars/{Ubuntu-20-py3.yml => Ubuntu-20.yml} | 0 .../vars/{Ubuntu-22-py3.yml => Ubuntu-22.yml} | 0 .../vars/{Ubuntu-24-py3.yml => Ubuntu-24.yml} | 0 .../setup_postgresql_db/vars/default-py3.yml | 11 ----- .../setup_postgresql_db/vars/default.yml | 2 +- tests/utils/constraints.txt | 11 ----- 38 files changed, 25 insertions(+), 308 deletions(-) delete mode 100644 tests/integration/targets/decompress/handlers/main.yml delete mode 100644 tests/integration/targets/setup_etcd3/vars/RedHat-7.yml delete mode 100644 tests/integration/targets/setup_etcd3/vars/Suse-py3.yml rename tests/integration/targets/setup_postgresql_db/vars/{Alpine-py3.yml => Alpine.yml} (100%) rename tests/integration/targets/setup_postgresql_db/vars/{Archlinux-py3.yml => Archlinux.yml} (100%) rename tests/integration/targets/setup_postgresql_db/vars/{Debian-11-py3.yml => Debian-11.yml} (100%) rename tests/integration/targets/setup_postgresql_db/vars/{Debian-12-py3.yml => Debian-12.yml} (100%) rename tests/integration/targets/setup_postgresql_db/vars/{Debian-13-py3.yml => Debian-13.yml} (100%) delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/Debian-8.yml delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/RedHat-py3.yml delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/Ubuntu-12.yml delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/Ubuntu-14.yml delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml rename tests/integration/targets/setup_postgresql_db/vars/{Ubuntu-18-py3.yml => Ubuntu-18.yml} (100%) rename tests/integration/targets/setup_postgresql_db/vars/{Ubuntu-20-py3.yml => Ubuntu-20.yml} (100%) rename tests/integration/targets/setup_postgresql_db/vars/{Ubuntu-22-py3.yml => Ubuntu-22.yml} (100%) rename tests/integration/targets/setup_postgresql_db/vars/{Ubuntu-24-py3.yml => Ubuntu-24.yml} (100%) delete mode 100644 tests/integration/targets/setup_postgresql_db/vars/default-py3.yml diff --git a/tests/integration/targets/apache2_mod_proxy/tasks/main.yml b/tests/integration/targets/apache2_mod_proxy/tasks/main.yml index 6ba6ee8808..a418d074db 100644 --- a/tests/integration/targets/apache2_mod_proxy/tasks/main.yml +++ b/tests/integration/targets/apache2_mod_proxy/tasks/main.yml @@ -71,7 +71,7 @@ - name: Install BeautifulSoup pip: - name: "{{ 'BeautifulSoup' if ansible_python_version is version('3', '<') else 'BeautifulSoup4' }}" + name: BeautifulSoup4 extra_args: "-c {{ remote_constraints }}" - name: Get all current balancer pool members attributes diff --git a/tests/integration/targets/archive/tasks/main.yml b/tests/integration/targets/archive/tasks/main.yml index 4ca41e254e..8ea39f49c9 100644 --- a/tests/integration/targets/archive/tasks/main.yml +++ b/tests/integration/targets/archive/tasks/main.yml @@ -51,49 +51,6 @@ apt: name=zip state=latest when: ansible_facts.pkg_mgr == 'apt' -- name: Install prerequisites for backports.lzma when using python2 (non OSX) - block: - - name: Set liblzma package name depending on the OS - set_fact: - liblzma_dev_package: - Debian: liblzma-dev - RedHat: xz-devel - Suse: xz-devel - - name: Ensure liblzma-dev is present to install backports-lzma - package: name={{ liblzma_dev_package[ansible_os_family] }} state=latest - when: ansible_os_family in liblzma_dev_package.keys() - when: - - ansible_python_version.split('.')[0] == '2' - - ansible_os_family != 'Darwin' - -- name: Install prerequisites for backports.lzma when using python2 (OSX) - block: - - name: Find brew binary - command: which brew - register: brew_which - - name: Get owner of brew binary - stat: path="{{ brew_which.stdout }}" - register: brew_stat - - name: "Install package" - homebrew: - name: xz - state: present - update_homebrew: false - become: true - become_user: "{{ brew_stat.stat.pw_name }}" - # Newer versions of brew want to compile a package which takes a long time. Do not upgrade homebrew until a - # proper solution can be found - environment: - HOMEBREW_NO_AUTO_UPDATE: "True" - when: - - ansible_python_version.split('.')[0] == '2' - - ansible_os_family == 'Darwin' - -- name: Ensure backports.lzma is present to create test archive (pip) - pip: name=backports.lzma state=latest - when: ansible_python_version.split('.')[0] == '2' - register: backports_lzma_pip - - name: Define formats to test set_fact: formats: @@ -138,8 +95,3 @@ loop: "{{ formats }}" loop_control: loop_var: format - -# Test cleanup -- name: Remove backports.lzma if previously installed (pip) - pip: name=backports.lzma state=absent - when: backports_lzma_pip is changed 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 685c2bc1c4..00f46cff6b 100644 --- a/tests/integration/targets/cloud_init_data_facts/tasks/main.yml +++ b/tests/integration/targets/cloud_init_data_facts/tasks/main.yml @@ -22,11 +22,8 @@ # to /etc/init/ureadahead.conf.disabled by cloud-init' clashes with `local diversion of # /etc/init/ureadahead.conf to /etc/init/ureadahead.conf.distrib # https://bugs.launchpad.net/ubuntu/+source/ureadahead/+bug/997838 - # Will also have to skip on OpenSUSE when running on Python 2 on newer Leap versions - # (!= 42 and >= 15) as cloud-init will install the Python 3 package, breaking our build on py2. when: - not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int == 14) - - not (ansible_os_family == "Suse" and ansible_distribution_major_version|int != 42 and ansible_python.version.major != 3) - not (ansible_os_family == "Suse" and ansible_distribution_major_version|int == 15) - 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? diff --git a/tests/integration/targets/decompress/handlers/main.yml b/tests/integration/targets/decompress/handlers/main.yml deleted file mode 100644 index 8c92cc4f81..0000000000 --- a/tests/integration/targets/decompress/handlers/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# 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: delete backports.lzma - pip: - name: backports.lzma - state: absent diff --git a/tests/integration/targets/decompress/tasks/main.yml b/tests/integration/targets/decompress/tasks/main.yml index f14f2d5593..f5900473ea 100644 --- a/tests/integration/targets/decompress/tasks/main.yml +++ b/tests/integration/targets/decompress/tasks/main.yml @@ -37,24 +37,7 @@ state: latest when: ansible_os_family == 'Debian' -- name: Install prerequisites for backports.lzma when using python2 (non OSX) - block: - - name: Set liblzma package name depending on the OS - set_fact: - liblzma_dev_package: - Debian: liblzma-dev - RedHat: xz-devel - Suse: xz-devel - - name: Ensure liblzma-dev is present to install backports-lzma - package: - name: "{{ liblzma_dev_package[ansible_os_family] }}" - state: latest - when: ansible_os_family in liblzma_dev_package.keys() - when: - - ansible_python_version.split('.')[0] == '2' - - ansible_os_family != 'Darwin' - -- name: Install prerequisites for backports.lzma when using python2 (OSX) +- name: Ensure xz is present to create compressed file (macOS) block: - name: Find brew binary command: which brew @@ -77,14 +60,6 @@ when: - ansible_os_family == 'Darwin' -- name: Ensure backports.lzma is present to create test archive (pip) - pip: - name: backports.lzma - state: latest - when: ansible_python_version.split('.')[0] == '2' - notify: - - delete backports.lzma - - name: Generate compressed files shell: | gzip < {{ item }} > {{ item }}.gz diff --git a/tests/integration/targets/filesystem/tasks/main.yml b/tests/integration/targets/filesystem/tasks/main.yml index 55a513bf77..b2ae94afa5 100644 --- a/tests/integration/targets/filesystem/tasks/main.yml +++ b/tests/integration/targets/filesystem/tasks/main.yml @@ -82,11 +82,6 @@ - 'not (ansible_distribution == "CentOS" and ansible_distribution_version is version("7.0", "<") and item.1 == "overwrite_another_fs")' - # The xfsprogs package on newer versions of OpenSUSE (15+) require Python 3, we skip this on our Python 2 container - # OpenSUSE 42.3 Python2 and the other py3 containers are not affected so we will continue to run that - - 'not (ansible_os_family == "Suse" and ansible_distribution_major_version|int != 42 and - item.0.key == "xfs" and ansible_python.version.major == 2)' - # TODO: something seems to be broken on Alpine - 'not (ansible_distribution == "Alpine")' diff --git a/tests/integration/targets/filesystem/tasks/setup.yml b/tests/integration/targets/filesystem/tasks/setup.yml index aeda1e4a7f..12d86d1ba9 100644 --- a/tests/integration/targets/filesystem/tasks/setup.yml +++ b/tests/integration/targets/filesystem/tasks/setup.yml @@ -10,8 +10,6 @@ ansible.builtin.package: name: '{{ item }}' state: present - # xfsprogs on OpenSUSE requires Python 3, skip this for our newer Py2 OpenSUSE builds - when: not (item == 'xfsprogs' and ansible_os_family == 'Suse' and ansible_python.version.major == 2 and ansible_distribution_major_version|int != 42) loop: - e2fsprogs - xfsprogs @@ -48,7 +46,7 @@ - name: "Install btrfs progs (OpenSuse)" ansible.builtin.package: name: - - python{{ ansible_python.version.major }}-xml + - python3-xml - btrfsprogs state: present when: ansible_os_family == 'Suse' diff --git a/tests/integration/targets/setup_etcd3/tasks/main.yml b/tests/integration/targets/setup_etcd3/tasks/main.yml index 72252cfe51..3510a291f7 100644 --- a/tests/integration/targets/setup_etcd3/tasks/main.yml +++ b/tests/integration/targets/setup_etcd3/tasks/main.yml @@ -15,24 +15,13 @@ # setup etcd3 for supported distros - block: - - name: python 2 - set_fact: - python_suffix: "" - when: ansible_python_version is version('3', '<') - - - name: python 3 - set_fact: - python_suffix: "-py3" - when: ansible_python_version is version('3', '>=') - - include_vars: '{{ item }}' with_first_found: - files: - - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}{{ python_suffix }}.yml' - - '{{ ansible_distribution }}-{{ ansible_distribution_version }}{{ python_suffix }}.yml' - - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}{{ python_suffix }}.yml' - - '{{ ansible_os_family }}{{ python_suffix }}.yml' - - 'default{{ python_suffix }}.yml' + - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml' + - '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml' + - '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml' + - '{{ ansible_os_family }}.yml' - 'default.yml' paths: '../vars' diff --git a/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml b/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml deleted file mode 100644 index 6e1017fe83..0000000000 --- a/tests/integration/targets/setup_etcd3/vars/RedHat-7.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# 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 - -etcd3_pip_module: etcd3<0.12 diff --git a/tests/integration/targets/setup_etcd3/vars/Suse-py3.yml b/tests/integration/targets/setup_etcd3/vars/Suse-py3.yml deleted file mode 100644 index 4e7c275b89..0000000000 --- a/tests/integration/targets/setup_etcd3/vars/Suse-py3.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# 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 - -# SuSE's python 3.6.10 comes with six 1.11.0 as distutil -# we restrict to etcd3 < 0.11 to avoid pip to try to upgrade six -etcd3_pip_module: 'etcd3<0.11' diff --git a/tests/integration/targets/setup_openldap/tasks/main.yml b/tests/integration/targets/setup_openldap/tasks/main.yml index a4cdae6de2..54d51f0fea 100644 --- a/tests/integration/targets/setup_openldap/tasks/main.yml +++ b/tests/integration/targets/setup_openldap/tasks/main.yml @@ -19,17 +19,10 @@ name: '{{ item }}' loop: '{{ openldap_packages_name }}' - - name: Install python-ldap (Python 3) + - name: Install python-ldap become: true package: name: '{{ python_ldap_package_name_python3 }}' - when: ansible_python_version is version('3.0', '>=') - - - name: Install python-ldap (Python 2) - become: true - package: - name: '{{ python_ldap_package_name }}' - when: ansible_python_version is version('3.0', '<') - name: Make sure OpenLDAP service is stopped become: true diff --git a/tests/integration/targets/setup_openssl/tasks/main.yml b/tests/integration/targets/setup_openssl/tasks/main.yml index 6490e65b41..667dfa699f 100644 --- a/tests/integration/targets/setup_openssl/tasks/main.yml +++ b/tests/integration/targets/setup_openssl/tasks/main.yml @@ -29,17 +29,11 @@ - when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6'] block: - - name: Install cryptography (Python 3) + - name: Install cryptography become: true package: name: '{{ cryptography_package_name_python3 }}' - when: not cryptography_from_pip and ansible_python_version is version('3.0', '>=') - - - name: Install cryptography (Python 2) - become: true - package: - name: '{{ cryptography_package_name }}' - when: not cryptography_from_pip and ansible_python_version is version('3.0', '<') + when: not cryptography_from_pip - name: Install cryptography (pip) become: true @@ -48,17 +42,11 @@ extra_args: "-c {{ remote_constraints }}" when: cryptography_from_pip -- name: Install pyOpenSSL (Python 3) +- name: Install pyOpenSSL become: true package: name: '{{ pyopenssl_package_name_python3 }}' - when: pyopenssl_package_name_python3 is defined and ansible_python_version is version('3.0', '>=') - -- name: Install pyOpenSSL (Python 2) - become: true - package: - name: '{{ pyopenssl_package_name }}' - when: pyopenssl_package_name is defined and ansible_python_version is version('3.0', '<') + when: pyopenssl_package_name_python3 is defined - name: register openssl version shell: "openssl version | cut -d' ' -f2" diff --git a/tests/integration/targets/setup_postgresql_db/tasks/main.yml b/tests/integration/targets/setup_postgresql_db/tasks/main.yml index d6b8701e9a..295718fc18 100644 --- a/tests/integration/targets/setup_postgresql_db/tasks/main.yml +++ b/tests/integration/targets/setup_postgresql_db/tasks/main.yml @@ -20,25 +20,15 @@ - meta: end_play when: ansible_facts.distribution == 'Fedora' and ansible_facts.distribution_major_version == '34' -- name: python 2 - set_fact: - python_suffix: '' - when: ansible_python_version is version('3', '<') - -- name: python 3 - set_fact: - python_suffix: -py3 - when: ansible_python_version is version('3', '>=') - - name: Include distribution and Python version specific variables include_vars: '{{ lookup(''first_found'', params) }}' vars: params: files: - - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}{{ python_suffix }}.yml' - - '{{ ansible_distribution }}-{{ ansible_distribution_version }}{{ python_suffix }}.yml' - - '{{ ansible_os_family }}{{ python_suffix }}.yml' - - default{{ python_suffix }}.yml + - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml' + - '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml' + - '{{ ansible_os_family }}.yml' + - default.yml paths: - '{{ role_path }}/vars' diff --git a/tests/integration/targets/setup_postgresql_db/vars/Alpine-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Alpine.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Alpine-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Alpine.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/Archlinux-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Archlinux.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Archlinux-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Archlinux.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/Debian-11-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Debian-11.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Debian-11-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Debian-11.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/Debian-12-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Debian-12.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Debian-12-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Debian-12.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/Debian-13-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Debian-13.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Debian-13-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Debian-13.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/Debian-8.yml b/tests/integration/targets/setup_postgresql_db/vars/Debian-8.yml deleted file mode 100644 index 87063214a8..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/Debian-8.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# 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" - - "python-psycopg2" - -pg_hba_location: "/etc/postgresql/9.4/main/pg_hba.conf" -pg_dir: "/var/lib/postgresql/9.4/main" -pg_ver: 9.4 diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml deleted file mode 100644 index a92de47cb2..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11-py3.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# 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: - - postgresql95-server - - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" - -pg_dir: /usr/local/pgsql/data -pg_hba_location: "{{ pg_dir }}/pg_hba.conf" -pg_ver: 9.5 -pg_user: pgsql -pg_group: pgsql - -locale_latin_suffix: .ISO8859-1 -locale_utf8_suffix: .UTF-8 diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11.yml index c38f3b59be..a92de47cb2 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-11.yml @@ -5,7 +5,7 @@ postgresql_packages: - postgresql95-server - - py27-psycopg2 + - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" pg_dir: /usr/local/pgsql/data pg_hba_location: "{{ pg_dir }}/pg_hba.conf" diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml deleted file mode 100644 index a92de47cb2..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0-py3.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# 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: - - postgresql95-server - - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" - -pg_dir: /usr/local/pgsql/data -pg_hba_location: "{{ pg_dir }}/pg_hba.conf" -pg_ver: 9.5 -pg_user: pgsql -pg_group: pgsql - -locale_latin_suffix: .ISO8859-1 -locale_utf8_suffix: .UTF-8 diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0.yml index 7c5586f5bf..a92de47cb2 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.0.yml @@ -4,12 +4,12 @@ # SPDX-License-Identifier: GPL-3.0-or-later postgresql_packages: - - postgresql96-server - - py27-psycopg2 + - postgresql95-server + - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" pg_dir: /usr/local/pgsql/data pg_hba_location: "{{ pg_dir }}/pg_hba.conf" -pg_ver: 9.6 +pg_ver: 9.5 pg_user: pgsql pg_group: pgsql diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml deleted file mode 100644 index 8e5ddfa137..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1-py3.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# 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: - - postgresql11-server - - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" - -pg_dir: /var/db/postgres/data11 -pg_hba_location: "{{ pg_dir }}/pg_hba.conf" -pg_ver: 11 -pg_user: postgres -pg_group: postgres - -locale_latin_suffix: .ISO8859-1 -locale_utf8_suffix: .UTF-8 diff --git a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1.yml b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1.yml index 0cdc22e13b..8e5ddfa137 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/FreeBSD-12.1.yml @@ -5,7 +5,7 @@ postgresql_packages: - postgresql11-server - - py27-psycopg2 + - "py{{ ansible_python.version.major }}{{ ansible_python.version.minor }}-psycopg2" pg_dir: /var/db/postgres/data11 pg_hba_location: "{{ pg_dir }}/pg_hba.conf" diff --git a/tests/integration/targets/setup_postgresql_db/vars/RedHat-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/RedHat-py3.yml deleted file mode 100644 index 3892f2e451..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/RedHat-py3.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# 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-server" - - "python3-psycopg2" - - "bzip2" - - "xz" - -pg_hba_location: "/var/lib/pgsql/data/pg_hba.conf" -pg_dir: "/var/lib/pgsql/data" diff --git a/tests/integration/targets/setup_postgresql_db/vars/RedHat.yml b/tests/integration/targets/setup_postgresql_db/vars/RedHat.yml index 5670a7fc92..3892f2e451 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/RedHat.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/RedHat.yml @@ -5,8 +5,9 @@ postgresql_packages: - "postgresql-server" - - "python-psycopg2" + - "python3-psycopg2" - "bzip2" + - "xz" pg_hba_location: "/var/lib/pgsql/data/pg_hba.conf" pg_dir: "/var/lib/pgsql/data" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-12.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-12.yml deleted file mode 100644 index 1d850de845..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-12.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# 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" - - "python-psycopg2" - -pg_hba_location: "/etc/postgresql/9.1/main/pg_hba.conf" -pg_dir: "/var/lib/postgresql/9.1/main" -pg_ver: 9.1 diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-14.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-14.yml deleted file mode 100644 index 881fc533ea..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-14.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# 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" - - "python-psycopg2" - -pg_hba_location: "/etc/postgresql/9.3/main/pg_hba.conf" -pg_dir: "/var/lib/postgresql/9.3/main" -pg_ver: 9.3 diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml deleted file mode 100644 index 482982fe1e..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16-py3.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# 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/9.5/main/pg_hba.conf" -pg_dir: "/var/lib/postgresql/9.5/main" -pg_ver: 9.5 diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16.yml index f2df72af7c..482982fe1e 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-16.yml @@ -6,7 +6,7 @@ postgresql_packages: - "postgresql" - "postgresql-common" - - "python-psycopg2" + - "python3-psycopg2" pg_hba_location: "/etc/postgresql/9.5/main/pg_hba.conf" pg_dir: "/var/lib/postgresql/9.5/main" diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-18-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-18.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Ubuntu-18-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Ubuntu-18.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-20-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-20.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Ubuntu-20-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Ubuntu-20.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Ubuntu-22.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-24-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/Ubuntu-24.yml similarity index 100% rename from tests/integration/targets/setup_postgresql_db/vars/Ubuntu-24-py3.yml rename to tests/integration/targets/setup_postgresql_db/vars/Ubuntu-24.yml diff --git a/tests/integration/targets/setup_postgresql_db/vars/default-py3.yml b/tests/integration/targets/setup_postgresql_db/vars/default-py3.yml deleted file mode 100644 index 6f96043a39..0000000000 --- a/tests/integration/targets/setup_postgresql_db/vars/default-py3.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 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-server" - - "python3-psycopg2" - -pg_hba_location: "/var/lib/pgsql/data/pg_hba.conf" -pg_dir: "/var/lib/pgsql/data" diff --git a/tests/integration/targets/setup_postgresql_db/vars/default.yml b/tests/integration/targets/setup_postgresql_db/vars/default.yml index 9d64d969aa..6f96043a39 100644 --- a/tests/integration/targets/setup_postgresql_db/vars/default.yml +++ b/tests/integration/targets/setup_postgresql_db/vars/default.yml @@ -5,7 +5,7 @@ postgresql_packages: - "postgresql-server" - - "python-psycopg2" + - "python3-psycopg2" pg_hba_location: "/var/lib/pgsql/data/pg_hba.conf" pg_dir: "/var/lib/pgsql/data" diff --git a/tests/utils/constraints.txt b/tests/utils/constraints.txt index f58f9fed57..1de42c4590 100644 --- a/tests/utils/constraints.txt +++ b/tests/utils/constraints.txt @@ -2,30 +2,19 @@ # 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 -certifi < 2022.5.18 ; python_version < '3.5' # certifi 2022.5.18 requires Python 3.5 or later -cryptography >= 3.0, < 3.4 ; python_version < '3.6' # cryptography 3.4 drops support for python 2.7 cryptography >= 3.3, < 3.4 ; python_version < '3.9' # FIXME: the upper limit is needed for RHEL8.2, CentOS 8, Ubuntu 18.04, and OpenSuSE 15 -deepdiff < 4.0.0 ; python_version < '3' # deepdiff 4.0.0 and later require python 3 pywinrm >= 0.3.0 # message encryption support pycrypto >= 2.6 # Need features found in 2.6 and greater ncclient >= 0.5.2 # Need features added in 0.5.2 and greater -python-nomad < 2.0.0 ; python_version <= '3.7' # python-nomad 2.0.0 needs Python 3.7+ ntlm-auth >= 1.3.0 # message encryption support using cryptography -requests < 2.28 ; python_version < '3.7' # requests 2.28.0 drops support for python 3.6 and before requests-ntlm >= 1.1.0 # message encryption support requests-credssp >= 0.1.0 # message encryption support voluptuous >= 0.11.0 # Schema recursion via Self openshift >= 0.6.2, < 0.9.0 # merge_type support -pyopenssl < 22.0.0 ; python_version < '3.6' # pyOpenSSL 22.0.0 and later require python 3.6 or later pyfmg == 0.6.1 # newer versions do not pass current unit tests -mock >= 2.0.0 # needed for features backported from Python 3.6 unittest.mock (assert_called, assert_called_once...) 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: -redis < 4.0.0 ; python_version < '3.6' -redis ; python_version >= '3.6' -pycdlib < 1.13.0 ; python_version < '3' # 1.13.0 does not work with Python 2, while not declaring that -python-daemon <= 2.3.0 ; python_version < '3' 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