Skip to content

Conversation

@pmcgeever
Copy link

@pmcgeever pmcgeever commented Nov 7, 2025

With ansible-core 2.19 several tasks fail with Boolean condition errors.
E.g.

[ERROR]: Task failed: Conditional result (True) was derived from value of type 'str' at '/home/patrick/workspace/dev/homelab/roles/ansible-role-nodejs/defaults/main.yml:31:30'. Conditionals must have a boolean result.

Ansible core (from 2.19) changed the way that they handle conditional statements such that falsy statement like "false" now need to be an actual Boolean.
See: https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_core_2.19.html#broken-conditionals

Tested with...
ansible [core 2.19.4]
python version = 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)

@pmcgeever pmcgeever closed this Nov 7, 2025
@pmcgeever
Copy link
Author

Duplicate of #171

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.

1 participant