From 73f75191339771b2c09b37ffe6acefbb97e06467 Mon Sep 17 00:00:00 2001 From: Hideki Saito Date: Tue, 15 Oct 2024 12:28:34 +0900 Subject: [PATCH] Drop ansible-core 2.14 and set 2.15 minimum version * backports #562 * fixes #578 Signed-off-by: Hideki Saito --- changelogs/fragments/580_drop_ansible214.yml | 5 +++++ meta/runtime.yml | 2 +- tests/integration/targets/selinux/tasks/selinux.yml | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/580_drop_ansible214.yml diff --git a/changelogs/fragments/580_drop_ansible214.yml b/changelogs/fragments/580_drop_ansible214.yml new file mode 100644 index 0000000000..6ad722b61a --- /dev/null +++ b/changelogs/fragments/580_drop_ansible214.yml @@ -0,0 +1,5 @@ +--- +bugfixes: + - backport - Drop ansible-core 2.14 and set 2.15 minimum version (https://github.com/ansible-collections/ansible.posix/issues/578). +trivial: + - selinux - conditions for selinux integration tests have been modified to be more accurate. diff --git a/meta/runtime.yml b/meta/runtime.yml index a0af68f138..31bebfe8ea 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,5 +1,5 @@ --- -requires_ansible: ">=2.14.0" +requires_ansible: ">=2.15.0" plugin_routing: callback: skippy: diff --git a/tests/integration/targets/selinux/tasks/selinux.yml b/tests/integration/targets/selinux/tasks/selinux.yml index b9cfb20347..b6ab7ccbe1 100644 --- a/tests/integration/targets/selinux/tasks/selinux.yml +++ b/tests/integration/targets/selinux/tasks/selinux.yml @@ -128,8 +128,8 @@ ansible.builtin.assert: that: - selinux_config_original | length == selinux_config_after | length - - selinux_config_after[selinux_config_after.index('SELINUX=disabled')] is search("^SELINUX=\w+$") - - selinux_config_after[selinux_config_after.index('SELINUXTYPE=targeted')] is search("^SELINUXTYPE=\w+$") + - (selinux_config_after | select("search", "^SELINUX=disabled\s*$") | list | length) > 0 + - (selinux_config_after | select("search", "^SELINUXTYPE=targeted\s*$") | list | length) > 0 - name: TEST 1 | Disable SELinux again, with kernel arguments update ansible.posix.selinux: