From b1aa3db9877b94b341f4be3c0ef1bbaff0b2c439 Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Tue, 12 Dec 2023 11:11:00 +0100 Subject: [PATCH] test: fix jinja templates in conditionals Conditional statements should not include jinja2 templating delimiters. Conditional is marked as unsafe, and cannot be evaluated. --- tests/tests_sbd_all_options.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests_sbd_all_options.yml b/tests/tests_sbd_all_options.yml index 48f95463..8484c0e4 100644 --- a/tests/tests_sbd_all_options.yml +++ b/tests/tests_sbd_all_options.yml @@ -133,7 +133,7 @@ assert: that: - "'SBD_DELAY_START=\"2\"' in __test_sbd_config_lines" - - "'SBD_DEVICE=\"{{ __test_sbd_mount.stdout }}\"' + - "'SBD_DEVICE=\"' ~ __test_sbd_mount.stdout ~ '\"' in __test_sbd_config_lines" - "'SBD_STARTMODE=\"clean\"' in __test_sbd_config_lines" - "'SBD_TIMEOUT_ACTION=\"reboot,flush\"' @@ -142,7 +142,7 @@ - "'SBD_WATCHDOG_TIMEOUT=\"10\"' in __test_sbd_config_lines" - > __test_sbd_config_lines[-1] - == 'SBD_OPTS="-n {{ __ha_cluster_node_name }}"' + == 'SBD_OPTS="-n ' ~ __ha_cluster_node_name ~ '"' - name: Check firewall and selinux state include_tasks: tasks/check_firewall_selinux.yml