Skip to content

Fix broken conditional in chia-blockchain Add Keys task#465

Merged
TheLastCicada merged 1 commit intomainfrom
fix-broken-conditionals
Feb 27, 2026
Merged

Fix broken conditional in chia-blockchain Add Keys task#465
TheLastCicada merged 1 commit intomainfrom
fix-broken-conditionals

Conversation

@TheLastCicada
Copy link
Contributor

Summary

  • The Add Keys task in the chia-blockchain role uses keys | length as a when: conditional, which evaluates to an integer (e.g. 1). Recent Ansible versions enforce that conditionals must produce a boolean result, causing this task to fail with:

    Conditional result (True) was derived from value of type 'int'. Conditionals must have a boolean result.

  • Changed keys | length to keys | length > 0 so the expression evaluates to true/false instead of a truthy integer.

  • This was the only instance of this pattern in the repo.

Test plan

  • Verify the chia-managed-wbcats CI pipeline passes with this change
  • Confirm the Add Keys task correctly skips when keys is an empty list and runs when populated

Change `keys | length` to `keys | length > 0` so the conditional
evaluates to a boolean instead of an integer. Recent Ansible versions
require boolean results in `when:` clauses and reject truthy integers.
@TheLastCicada TheLastCicada merged commit 20203b6 into main Feb 27, 2026
11 checks passed
@TheLastCicada TheLastCicada deleted the fix-broken-conditionals branch February 27, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants