Skip to content

fix: use ansible_facts.distribution instead of deprecated ansible_distribution - #261

Open
valentinocossar wants to merge 1 commit into
MonolithProjects:masterfrom
valentinocossar:fix/deprecated-ansible-distribution-var
Open

fix: use ansible_facts.distribution instead of deprecated ansible_distribution#261
valentinocossar wants to merge 1 commit into
MonolithProjects:masterfrom
valentinocossar:fix/deprecated-ansible-distribution-var

Conversation

@valentinocossar

@valentinocossar valentinocossar commented Aug 24, 2026

Copy link
Copy Markdown

Summary

  • Fixes the INJECT_FACTS_AS_VARS deprecation warning raised on tasks/install_runner_unix.yml:180, where the become condition read the auto-injected top-level ansible_distribution var instead of the namespaced ansible_facts.distribution.
  • This auto-injection default is deprecated and will be removed in ansible-core 2.24, so relying on it will eventually break.
  • The rest of the file already consistently uses ansible_facts.<name> (e.g. ansible_facts.system, ansible_facts.services), so this brings the last straggler in line.
  • Purely a fact-access rename — same value, no behavior change, and no impact on the role's declared min_ansible_version: "2.10" since ansible_facts has been available since early Ansible 2.x.

Test plan

  • grep confirms no remaining bare ansible_distribution/top-level fact usage in the file
  • CI passes

🤖 Generated with Claude Code

https://claude.ai/code/session_01GZC9vFcMhnukbtdVM8zV62

…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
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