From 233743f2fe89e3be5b1e498393661fe2eca09833 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 10 Dec 2023 09:16:45 +0100 Subject: [PATCH] [PR #7709/0c7b9e50 backport][stable-7] Fix keytool setup on Debian Bookworm (#7711) Fix keytool setup on Debian Bookworm (#7709) Fix keytool setup on Debian Bookworm. (cherry picked from commit 0c7b9e50b50cff6d7d42d418a64ff4544a2590bc) Co-authored-by: Felix Fontein --- .../targets/setup_java_keytool/tasks/main.yml | 12 ++++++++++-- .../targets/setup_java_keytool/vars/Alpine.yml | 3 ++- .../targets/setup_java_keytool/vars/Archlinux.yml | 3 ++- .../targets/setup_java_keytool/vars/Debian-12.yml | 8 ++++++++ .../targets/setup_java_keytool/vars/Debian.yml | 3 ++- .../targets/setup_java_keytool/vars/RedHat.yml | 3 ++- .../targets/setup_java_keytool/vars/Suse.yml | 3 ++- 7 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 tests/integration/targets/setup_java_keytool/vars/Debian-12.yml diff --git a/tests/integration/targets/setup_java_keytool/tasks/main.yml b/tests/integration/targets/setup_java_keytool/tasks/main.yml index 2ab57d59d6..9f156425d8 100644 --- a/tests/integration/targets/setup_java_keytool/tasks/main.yml +++ b/tests/integration/targets/setup_java_keytool/tasks/main.yml @@ -16,11 +16,19 @@ }} - name: Include OS-specific variables - include_vars: '{{ ansible_os_family }}.yml' + include_vars: '{{ lookup("first_found", params) }}' + vars: + params: + files: + - '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml' + - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml' + - '{{ ansible_os_family }}.yml' + paths: + - '{{ role_path }}/vars' when: has_java_keytool - name: Install keytool package: - name: '{{ keytool_package_name }}' + name: '{{ keytool_package_names }}' become: true when: has_java_keytool diff --git a/tests/integration/targets/setup_java_keytool/vars/Alpine.yml b/tests/integration/targets/setup_java_keytool/vars/Alpine.yml index 4ff75ae8c3..c314c80ba0 100644 --- a/tests/integration/targets/setup_java_keytool/vars/Alpine.yml +++ b/tests/integration/targets/setup_java_keytool/vars/Alpine.yml @@ -3,4 +3,5 @@ # 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_name: openjdk11-jre-headless +keytool_package_names: + - openjdk11-jre-headless diff --git a/tests/integration/targets/setup_java_keytool/vars/Archlinux.yml b/tests/integration/targets/setup_java_keytool/vars/Archlinux.yml index 9e29065b3d..b342911b6d 100644 --- a/tests/integration/targets/setup_java_keytool/vars/Archlinux.yml +++ b/tests/integration/targets/setup_java_keytool/vars/Archlinux.yml @@ -3,4 +3,5 @@ # 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_name: jre11-openjdk-headless +keytool_package_names: + - jre11-openjdk-headless diff --git a/tests/integration/targets/setup_java_keytool/vars/Debian-12.yml b/tests/integration/targets/setup_java_keytool/vars/Debian-12.yml new file mode 100644 index 0000000000..17f8a53d0a --- /dev/null +++ b/tests/integration/targets/setup_java_keytool/vars/Debian-12.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-17-jre-headless diff --git a/tests/integration/targets/setup_java_keytool/vars/Debian.yml b/tests/integration/targets/setup_java_keytool/vars/Debian.yml index 30ae5cd047..cb5551a58e 100644 --- a/tests/integration/targets/setup_java_keytool/vars/Debian.yml +++ b/tests/integration/targets/setup_java_keytool/vars/Debian.yml @@ -3,4 +3,5 @@ # 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_name: ca-certificates-java +keytool_package_names: + - ca-certificates-java diff --git a/tests/integration/targets/setup_java_keytool/vars/RedHat.yml b/tests/integration/targets/setup_java_keytool/vars/RedHat.yml index c200091f81..8f4126e5dc 100644 --- a/tests/integration/targets/setup_java_keytool/vars/RedHat.yml +++ b/tests/integration/targets/setup_java_keytool/vars/RedHat.yml @@ -3,4 +3,5 @@ # 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_name: java-11-openjdk-headless +keytool_package_names: + - java-11-openjdk-headless diff --git a/tests/integration/targets/setup_java_keytool/vars/Suse.yml b/tests/integration/targets/setup_java_keytool/vars/Suse.yml index c200091f81..8f4126e5dc 100644 --- a/tests/integration/targets/setup_java_keytool/vars/Suse.yml +++ b/tests/integration/targets/setup_java_keytool/vars/Suse.yml @@ -3,4 +3,5 @@ # 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_name: java-11-openjdk-headless +keytool_package_names: + - java-11-openjdk-headless