Skip to content

misc: Use ansible_facts instead of deprecated top-level fact variables - #1204

Merged
vojtechtrefny merged 1 commit into
storaged-project:masterfrom
vojtechtrefny:master_fix-ansible-deprecated
Aug 21, 2026
Merged

misc: Use ansible_facts instead of deprecated top-level fact variables#1204
vojtechtrefny merged 1 commit into
storaged-project:masterfrom
vojtechtrefny:master_fix-ansible-deprecated

Conversation

@vojtechtrefny

@vojtechtrefny vojtechtrefny commented Aug 20, 2026

Copy link
Copy Markdown
Member

Ansible deprecated the injected top-level ansible_* fact variables (e.g. ansible_distribution) in favour of accessing them through the ansible_facts dictionary.

Summary by CodeRabbit

  • Bug Fixes
    • Improved dependency installation across Fedora, CentOS, Debian, and Ubuntu environments.
    • Preserved appropriate repository handling for different Ubuntu versions.
    • Improved architecture detection for 64-bit VDO support.

Ansible deprecated the injected top-level ansible_* fact variables
(e.g. ansible_distribution) in favour of accessing them through the
ansible_facts dictionary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 076ad026-7e13-47e9-8824-faf700a0aab3

📥 Commits

Reviewing files that changed from the base of the PR and between b1ba4a2 and 15eadda.

📒 Files selected for processing (1)
  • misc/libblockdev-tasks.yml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The dependency-installation tasks now use ansible_facts for distribution, distribution version, and architecture checks across Fedora, CentOS, Debian, and Ubuntu.

Changes

Dependency condition updates

Layer / File(s) Summary
Fedora condition updates
misc/libblockdev-tasks.yml
Fedora dependency and test tasks now use ansible_facts['distribution'].
CentOS condition updates
misc/libblockdev-tasks.yml
CentOS dependency, test-dependency, and pylint tasks now use ansible_facts['distribution'].
Debian and Ubuntu condition updates
misc/libblockdev-tasks.yml
Debian and Ubuntu tasks now use fact-based distribution and version checks. The 64-bit VDO condition now uses ansible_facts['architecture'].

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 15ead

This localized update replaces deprecated Ansible fact access without supplied evidence of a user-facing or production-impacting issue; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: replacing deprecated top-level Ansible fact variables with ansible_facts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vojtechtrefny
vojtechtrefny merged commit 31f2a3f into storaged-project:master Aug 21, 2026
48 of 50 checks passed
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