From b859b8e505a725f74e64aa2e04d202f2738f3239 Mon Sep 17 00:00:00 2001 From: David Demlow Date: Thu, 29 Oct 2026 07:36:51 -0400 Subject: [PATCH] vm_replication_info: fix remaining bare-string assert conditional Same root cause as #385 (ansible-core 2.17.4 rejects a bare non-empty string used directly in a conditional), but on live API-response fields (vm_name, remote_cluster) rather than a static config value, in a file #385 didn't scope (10_vm_replication_info.yml, included by main.yml rather than main.yml itself). Found 2026-10-29 on the validation run for #384/#385: vm_replication and vm_clone__replicated both passed clean, but vm_replication_info still failed on this one additional occurrence of the same pattern. A broader sweep found ~38 candidate sites across the collection using this same bare-truthy idiom -- tracked separately as an issue for XLab rather than fixed wholesale here, since this PR's scope is just unblocking this one target. Co-Authored-By: Claude Sonnet 5 --- .../tasks/10_vm_replication_info.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/integration/targets/vm_replication_info/tasks/10_vm_replication_info.yml b/tests/integration/targets/vm_replication_info/tasks/10_vm_replication_info.yml index 3e86976a0..73bd9eb23 100644 --- a/tests/integration/targets/vm_replication_info/tasks/10_vm_replication_info.yml +++ b/tests/integration/targets/vm_replication_info/tasks/10_vm_replication_info.yml @@ -71,13 +71,16 @@ scale_computing.hypercore.vm_replication_info: register: replication_info_all - ansible.builtin.assert: + # vm_name/remote_cluster are non-empty strings here, not real booleans -- a bare string + # in assert.that used to be truthy-tested implicitly, but ansible-core 2.17.4 rejects it + # with "Conditionals must have a boolean result" (MEASURED 2026-10-29). that: - replication_info_all is succeeded - replication_info_all is not changed - replication_info_all.records | length >= 2 - - replication_info_all.records[0].vm_name + - replication_info_all.records[0].vm_name | length > 0 - replication_info_all.records[0].state in ['enabled', 'disabled'] - - replication_info_all.records[0].remote_cluster - - replication_info_all.records[1].vm_name + - replication_info_all.records[0].remote_cluster | length > 0 + - replication_info_all.records[1].vm_name | length > 0 - replication_info_all.records[1].state in ['enabled', 'disabled'] - - replication_info_all.records[1].remote_cluster + - replication_info_all.records[1].remote_cluster | length > 0