From 0f7c5f0de111d6a5d2340ba3c716575867ca7532 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 18 Nov 2024 21:36:53 +0100 Subject: [PATCH] CI: Fix cryptsetup version for RHEL 9.1/9.2/9.3/9.4 (#819) * Fix cryptsetup version for RHEL 9.1/9.2/9.3. * Also fix version for RHEL 9.4. * Trigger change in openssh_cert. * Use lower-case names. * Actually install the right version. --- tests/integration/targets/luks_device/tasks/main.yml | 10 +++++----- .../luks_device/vars/{Alpine.yml => alpine.yml} | 0 .../targets/luks_device/vars/redhat-9.1.yml | 8 ++++++++ .../targets/luks_device/vars/redhat-9.2.yml | 8 ++++++++ .../targets/luks_device/vars/redhat-9.3.yml | 8 ++++++++ .../targets/luks_device/vars/redhat-9.4.yml | 8 ++++++++ .../targets/openssh_cert/tests/ssh-agent.yml | 1 + 7 files changed, 38 insertions(+), 5 deletions(-) rename tests/integration/targets/luks_device/vars/{Alpine.yml => alpine.yml} (100%) create mode 100644 tests/integration/targets/luks_device/vars/redhat-9.1.yml create mode 100644 tests/integration/targets/luks_device/vars/redhat-9.2.yml create mode 100644 tests/integration/targets/luks_device/vars/redhat-9.3.yml create mode 100644 tests/integration/targets/luks_device/vars/redhat-9.4.yml diff --git a/tests/integration/targets/luks_device/tasks/main.yml b/tests/integration/targets/luks_device/tasks/main.yml index 2570fa31..7fa8fe7a 100644 --- a/tests/integration/targets/luks_device/tasks/main.yml +++ b/tests/integration/targets/luks_device/tasks/main.yml @@ -21,17 +21,17 @@ vars: search: files: - - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml' - - '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml' - - '{{ ansible_distribution }}.yml' - - '{{ ansible_os_family }}.yml' + - '{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml' + - '{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml' + - '{{ ansible_distribution | lower }}.yml' + - '{{ ansible_os_family | lower }}.yml' - default.yml paths: - vars - name: Make sure cryptsetup is installed package: - name: cryptsetup + name: '{{ cryptsetup_package }}' state: present become: true diff --git a/tests/integration/targets/luks_device/vars/Alpine.yml b/tests/integration/targets/luks_device/vars/alpine.yml similarity index 100% rename from tests/integration/targets/luks_device/vars/Alpine.yml rename to tests/integration/targets/luks_device/vars/alpine.yml diff --git a/tests/integration/targets/luks_device/vars/redhat-9.1.yml b/tests/integration/targets/luks_device/vars/redhat-9.1.yml new file mode 100644 index 00000000..09356d7f --- /dev/null +++ b/tests/integration/targets/luks_device/vars/redhat-9.1.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 + +cryptsetup_package: cryptsetup-2.6.0 + +luks_extra_packages: [] diff --git a/tests/integration/targets/luks_device/vars/redhat-9.2.yml b/tests/integration/targets/luks_device/vars/redhat-9.2.yml new file mode 100644 index 00000000..09356d7f --- /dev/null +++ b/tests/integration/targets/luks_device/vars/redhat-9.2.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 + +cryptsetup_package: cryptsetup-2.6.0 + +luks_extra_packages: [] diff --git a/tests/integration/targets/luks_device/vars/redhat-9.3.yml b/tests/integration/targets/luks_device/vars/redhat-9.3.yml new file mode 100644 index 00000000..09356d7f --- /dev/null +++ b/tests/integration/targets/luks_device/vars/redhat-9.3.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 + +cryptsetup_package: cryptsetup-2.6.0 + +luks_extra_packages: [] diff --git a/tests/integration/targets/luks_device/vars/redhat-9.4.yml b/tests/integration/targets/luks_device/vars/redhat-9.4.yml new file mode 100644 index 00000000..71964ab9 --- /dev/null +++ b/tests/integration/targets/luks_device/vars/redhat-9.4.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 + +cryptsetup_package: cryptsetup-2.7.2 + +luks_extra_packages: [] diff --git a/tests/integration/targets/openssh_cert/tests/ssh-agent.yml b/tests/integration/targets/openssh_cert/tests/ssh-agent.yml index 1f0c8229..1db0d218 100644 --- a/tests/integration/targets/openssh_cert/tests/ssh-agent.yml +++ b/tests/integration/targets/openssh_cert/tests/ssh-agent.yml @@ -11,6 +11,7 @@ - name: SSH-agent test block environment: SSH_AUTH_SOCK: "{{ openssh_agent_sock }}" + block: - name: Generate always valid cert using agent without key in agent (should fail) openssh_cert: