From e347af8569ae251f90a93964e7fe8581cf2b4486 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 15 Feb 2026 18:18:57 +0100 Subject: [PATCH] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20new=20task=20to=20gat?= =?UTF-8?q?her=20memory=20facts=20and=20update=20RAM=20calculation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces a new feature that adds a task specifically designed to gather memory-related facts. Additionally, it updates the RAM calculation logic to ensure accuracy based on the newly gathered data. --- tasks/ram.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tasks/ram.yml b/tasks/ram.yml index 98f113e..1193d8b 100644 --- a/tasks/ram.yml +++ b/tasks/ram.yml @@ -4,10 +4,13 @@ that: ansible_os_family == "Debian" fail_msg: "This role only supports Debian/Proxmox systems." +- name: Gather only memory fact + ansible.builtin.setup: + filter: ansible_memtotal_mb + - name: ram | Calculate log2ram size ansible.builtin.set_fact: - _total_ram_mb: "{{ ansible_memtotal_mb }}" - _calculated_size_mb: "{{ (_total_ram_mb * log2ram_ram_percent / 100) | int }}" + _calculated_size_mb: "{{ (ansible_memtotal_mb * log2ram_ram_percent / 100) | int }}" log2ram_size_mb: >- {{ [log2ram_min_size_mb,