Skip to content

Conversation

@sphilipp35
Copy link

… 2.18+

Recent versions of ansible-core (≥2.16, included in ansible 11.x) enforce strict boolean evaluation for 'when' statements. The previous condition:

when: cvmfs_config_repo and cvmfs_config_repo_supported

was no longer valid because:

  • cvmfs_config_repo is a dict (not directly evaluable as boolean)
  • cvmfs_config_repo_supported is a string ('true'/'false')

This caused runtime failures:

Conditional result (False) was derived from value of type 'dict'

The condition has been rewritten to use explicit boolean conversions:

when: (cvmfs_config_repo | length > 0) and (cvmfs_config_repo_supported | bool)

This restores compatibility with ansible-core 2.18+ (ansible 11.x) and preserves behavior with older releases.

… 2.18+

Recent versions of ansible-core (≥2.16, included in ansible 11.x)
enforce strict boolean evaluation for 'when' statements. The previous
condition:

    when: cvmfs_config_repo and cvmfs_config_repo_supported

was no longer valid because:
- cvmfs_config_repo is a dict (not directly evaluable as boolean)
- cvmfs_config_repo_supported is a string ('true'/'false')

This caused runtime failures:
> Conditional result (False) was derived from value of type 'dict'

The condition has been rewritten to use explicit boolean conversions:

    when: (cvmfs_config_repo | length > 0) and (cvmfs_config_repo_supported | bool)

This restores compatibility with ansible-core 2.18+ (ansible 11.x)
and preserves behavior with older releases.

Signed-off-by: sphilipp <sebastien.philippot.irisa.fr>
@sphilipp35 sphilipp35 requested a review from abretaud October 25, 2025 17:02
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