mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-08 10:26:35 +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:
@@ -1,6 +1,6 @@
|
||||
# Host resources
|
||||
RESOURCE_HOST_CPUS: "{{ ansible_processor_vcpus | int }}"
|
||||
RESOURCE_HOST_MEM: "{{ (ansible_memtotal_mb | int) // 1024 }}"
|
||||
RESOURCE_HOST_CPUS: "{{ ansible_facts['processor_vcpus'] | int }}"
|
||||
RESOURCE_HOST_MEM: "{{ (ansible_facts['memtotal_mb'] | int) // 1024 }}"
|
||||
|
||||
# Reserve for OS
|
||||
RESOURCE_HOST_RESERVE_CPU: 2
|
||||
|
||||
Reference in New Issue
Block a user