From 82af6080330ad60226bfd956689e1d13a07db098 Mon Sep 17 00:00:00 2001 From: Fabian Herschel Date: Mon, 25 Apr 2022 14:36:03 +0200 Subject: [PATCH] fix 1.2.2: the value for sbd must be equal OR GREATER (>=) then the expected value --- runner/ansible/roles/checks/1.2.2/tasks/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/runner/ansible/roles/checks/1.2.2/tasks/main.yml b/runner/ansible/roles/checks/1.2.2/tasks/main.yml index 4f41830..bc76198 100644 --- a/runner/ansible/roles/checks/1.2.2/tasks/main.yml +++ b/runner/ansible/roles/checks/1.2.2/tasks/main.yml @@ -2,11 +2,14 @@ - name: "{{ name }}.check" shell: | - timeout=$(crm_attribute -t crm_config -G -n stonith-timeout --quiet) + timeout=$(crm_attribute -t crm_config -G -n stonith-timeout --quiet | sed -e 's/s$//') + # + # for aws and gcp we might need additional expected vars (name + fence_aws_...) + # if [[cibadmin -Q --xpath "//primitive[@type='fence_azure_arm']/@type" > /dev/null 2>&1 ]]; then - exit $([[ "${timeout}" =~ {{ expected[name + '.fence_azure_arm'] }}s?$ ]]) + exit $([[ "${timeout}" -eq {{ expected[name + '.fence_azure_arm'] }} ]]) else - exit $([[ "${timeout}" =~ {{ expected[name + '.sbd'] }}s?$ ]]) + exit $([[ "${timeout}" -ge {{ expected[name + '.sbd'] }} ]]) fi check_mode: false register: config_updated