Refactor: Migrate deprecated Ansible facts to ansible_facts[] syntax

Why:
- Ansible 2.20+ deprecates INJECT_FACTS_AS_VARS and direct usage of top-level ansible_* facts.
- This change updates all affected roles and vars files to the new supported syntax.
- Ensures compatibility with upcoming Ansible 2.24 removal of implicit fact injection.

Conversation reference:
https://chatgpt.com/share/692f639b-1380-800f-9f18-732f7108e9e2
This commit is contained in:
2025-12-02 23:09:46 +01:00
parent 46174125bc
commit 94f97ed1f3
13 changed files with 21 additions and 21 deletions

View File

@@ -8,14 +8,14 @@
include_role:
name: update-pacman
when:
- ansible_distribution == 'Archlinux'
- ansible_facts['distribution'] == 'Archlinux'
- run_once_update_pacman is not defined
- name: "Update with apt"
include_role:
name: update-apt
when:
- ansible_distribution == "Debian"
- ansible_facts['distribution'] == "Debian"
- run_once_update_apt is not defined
- include_tasks: utils/once_finalize.yml