Conversation
[DEPRECATION WARNING]: Conditional result at location /runner/project/project_update.yml 231:15 was of type 'list'. Conditional results should only be True or False. The result was interpreted as False. This feature will be removed in version 2.19. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a deprecation warning that appears in Ansible 2.19+ when using ansible.builtin.first_found with skip=True in conditional statements. The lookup returns an empty list when no files are found, which Ansible interprets as a list type in conditionals rather than a boolean, triggering the deprecation warning.
Changes:
- Updated three task conditionals to use
req_file | length > 0instead of justreq_fileto properly evaluate the empty list as a boolean expression
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TheWitness
approved these changes
Feb 4, 2026
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.
This warning appears for all 3 tasks. Since the lookup for
ansible.builtin.first_foundhasskip=Trueset, it returns an empty list if not found. Conditional results should be True or False, not a list, so just need a small tweak to make it proper.