mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-07 18:05:09 +00:00
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:
@@ -2,7 +2,7 @@
|
||||
- name: Update package cache (Debian/Ubuntu)
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: ansible_os_family == "Debian"
|
||||
when: ansible_facts['os_family'] == "Debian"
|
||||
|
||||
- name: Install Chromium browser
|
||||
package:
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
application_id: "desk-chromium"
|
||||
|
||||
chromium_package: "{{ 'chromium-browser' if ansible_os_family == 'Debian' else 'chromium' }}"
|
||||
chromium_package: "{{ 'chromium-browser' if ansible_facts['os_family'] == 'Debian' else 'chromium' }}"
|
||||
Reference in New Issue
Block a user