From e347af8569ae251f90a93964e7fe8581cf2b4486 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 15 Feb 2026 18:18:57 +0100 Subject: [PATCH 1/2] =?UTF-8?q?feat=20=E2=9C=A8:=20Add=20new=20task=20to?= =?UTF-8?q?=20gather=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, -- 2.49.1 From 63b5215e8a8104c6aafdfa9b54ae94bb947c19e3 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 15 Feb 2026 18:22:14 +0100 Subject: [PATCH 2/2] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Refactor?= =?UTF-8?q?=20task=20naming=20to=20include=20role=20context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated task names to explicitly include the role context, improving clarity and consistency across the system. --- tasks/ram.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/ram.yml b/tasks/ram.yml index 1193d8b..a6f6e86 100644 --- a/tasks/ram.yml +++ b/tasks/ram.yml @@ -4,7 +4,7 @@ that: ansible_os_family == "Debian" fail_msg: "This role only supports Debian/Proxmox systems." -- name: Gather only memory fact +- name: ram | Gather only memory fact ansible.builtin.setup: filter: ansible_memtotal_mb -- 2.49.1