fix: Fix non-boolean conditions#82
Merged
richm merged 1 commit intoperformancecopilot:mainfrom Jun 23, 2025
Merged
Conversation
Ansible 2.19 demands conditions (`when:` or `assert:`) to have a boolean type. Fix list-value conditions with an explicit length check. Also fix the `pcp_accounts` default value in roles/pcp/tasks/main.yml -- that variable is a list (of objects), not an object.
martinpitt
added a commit
to martinpitt/lsr-metrics
that referenced
this pull request
Jun 23, 2025
Contributor
Author
|
Running system-role test with this change here: linux-system-roles/metrics#242 |
Contributor
Author
|
The F42 testing farm run passed, and the GitHub workflow run failed tests_verify_from_spark.yml as expected. |
Contributor
|
we really need to fix the ansible-lint action to exclude other collections . . . |
martinpitt
added a commit
to martinpitt/lsr-metrics
that referenced
this pull request
Jun 23, 2025
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ansible 2.19 demands conditions (
when:orassert:) to have a boolean type. Fix list-value conditions with an explicit length check.Also fix the
pcp_accountsdefault value in roles/pcp/tasks/main.yml -- that variable is a list (of objects), not an object.This fixes the Ansible 2.19 specific errors like
I tested them against https://github.com/linux-system-roles/metrics, I'll post a draft PR soon. Note that this still leaves one Fedora 42 failure in
tests_verify_from_spark.ymlwhich is unrelated, it's an SELinux rejection.@richm FYI