Compare commits

...

3 Commits

Author SHA1 Message Date
d7d078c5aa Merge pull request 'refactor ♻️: Refactor task naming to include role context' (#36) from dev into main
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 13s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s
Reviewed-on: #36
2026-02-15 18:23:53 +01:00
63b5215e8a refactor ♻️: Refactor task naming to include role context
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 12s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s
ai-reviews / Review PR (pull_request) Successful in 13s
PR check / Gitleaks (pull_request) Successful in 5s
PR check / lint tests (pull_request) Successful in 14s
PR check / labeler (pull_request) Successful in 2s
PR check / handle_failures (pull_request) Has been skipped
PR check / handle_success (pull_request) Successful in 2s
Updated task names to explicitly include the role context, improving clarity and consistency across the system.
2026-02-15 18:22:14 +01:00
e347af8569 feat : Add new task to gather memory facts and update RAM calculation
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 12s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s
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.
2026-02-15 18:18:57 +01:00

View File

@@ -4,10 +4,13 @@
that: ansible_os_family == "Debian" that: ansible_os_family == "Debian"
fail_msg: "This role only supports Debian/Proxmox systems." fail_msg: "This role only supports Debian/Proxmox systems."
- name: ram | Gather only memory fact
ansible.builtin.setup:
filter: ansible_memtotal_mb
- name: ram | Calculate log2ram size - name: ram | Calculate log2ram size
ansible.builtin.set_fact: ansible.builtin.set_fact:
_total_ram_mb: "{{ ansible_memtotal_mb }}" _calculated_size_mb: "{{ (ansible_memtotal_mb * log2ram_ram_percent / 100) | int }}"
_calculated_size_mb: "{{ (_total_ram_mb * log2ram_ram_percent / 100) | int }}"
log2ram_size_mb: >- log2ram_size_mb: >-
{{ {{
[log2ram_min_size_mb, [log2ram_min_size_mb,