Skip to content

Fix cloudflare_proxy conditional to use bool filter#466

Merged
TheLastCicada merged 1 commit intomainfrom
fix-cloudflare-proxy-bool
Feb 27, 2026
Merged

Fix cloudflare_proxy conditional to use bool filter#466
TheLastCicada merged 1 commit intomainfrom
fix-cloudflare-proxy-bool

Conversation

@TheLastCicada
Copy link
Contributor

Summary

  • Adds | bool filter to all 3 when: cloudflare_proxy conditionals in climate-nginx-base/tasks/main.yml
  • The cloudflare_proxy variable is passed as a host variable in Terraform-generated INI inventory files, which treat all values as strings. Newer Ansible versions reject non-boolean when: conditionals, causing a fatal error: Conditional result (True) was derived from value of type 'str'
  • Fixes https://github.com/Chia-Network/chia-managed/actions/runs/22506021862

Test plan

  • Verify chia-managed-wbcats deploy workflow passes with this role version
  • Confirm no regression on deployments where cloudflare_proxy is false (e.g. wb-core-registry)

The cloudflare_proxy variable is set as a host variable in INI inventory
files generated by Terraform. INI inventory treats all values as strings,
so `cloudflare_proxy=true` arrives as the string "True". Newer Ansible
versions enforce that `when:` conditionals must evaluate to actual
booleans, causing a fatal error.

Adding `| bool` filter converts the string to a proper boolean.
@TheLastCicada TheLastCicada merged commit c18852c into main Feb 27, 2026
11 checks passed
@TheLastCicada TheLastCicada deleted the fix-cloudflare-proxy-bool branch February 27, 2026 22:46
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