fix: use ansible_facts.distribution instead of deprecated ansible_distribution - #261
Open
valentinocossar wants to merge 1 commit into
Conversation
…tribution Avoids the INJECT_FACTS_AS_VARS deprecation warning (removed in ansible-core 2.24) by reading the fact through ansible_facts, matching the pattern already used elsewhere in this file. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZC9vFcMhnukbtdVM8zV62
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.
Summary
INJECT_FACTS_AS_VARSdeprecation warning raised ontasks/install_runner_unix.yml:180, where thebecomecondition read the auto-injected top-levelansible_distributionvar instead of the namespacedansible_facts.distribution.ansible_facts.<name>(e.g.ansible_facts.system,ansible_facts.services), so this brings the last straggler in line.min_ansible_version: "2.10"sinceansible_factshas been available since early Ansible 2.x.Test plan
grepconfirms no remaining bareansible_distribution/top-level fact usage in the file🤖 Generated with Claude Code
https://claude.ai/code/session_01GZC9vFcMhnukbtdVM8zV62