From 3242b070aa8694ffb4a4b9dd58fdb487f2edb3e2 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Mon, 20 Nov 2023 10:42:19 -0700 Subject: [PATCH] test: do not use true test with select Do not use `select("true")`. This causes an error with Ansible 2.9 with Jinja 2.7 because there is no `true` test. Instead, just rely on the default behavior of `select` to evaluate the argument in a boolean context. https://jinja.palletsprojects.com/en/2.9.x/templates/#select `If no test is specified, each object will be evaluated as a boolean.` Signed-off-by: Rich Megginson --- tasks/shell_pcs/check-and-prepare-role-variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/shell_pcs/check-and-prepare-role-variables.yml b/tasks/shell_pcs/check-and-prepare-role-variables.yml index 09f77e7b..283c5405 100644 --- a/tasks/shell_pcs/check-and-prepare-role-variables.yml +++ b/tasks/shell_pcs/check-and-prepare-role-variables.yml @@ -55,7 +55,7 @@ [item.target is defined, item.target_pattern is defined, item.target_attribute is defined] - | select("true") | list | length != 1 + | select | list | length != 1 loop: "{{ ha_cluster_stonith_levels }}" run_once: true