refactor ♻️: Refactor memory calculation logic #35

Merged
Jose merged 1 commits from dev into main 2026-02-15 17:40:30 +01:00
Owner

Removed unused variable and updated memory calculation to use ansible_memtotal_mb for more accurate results.

Removed unused variable and updated memory calculation to use ansible_memtotal_mb for more accurate results.
Jose added 1 commit 2026-02-15 17:38:46 +01:00
refactor ♻️: Refactor memory calculation logic
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 14s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 5s
ai-reviews / Review PR (pull_request) Successful in 31s
PR check / Gitleaks (pull_request) Successful in 4s
PR check / lint tests (pull_request) Successful in 15s
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 1s
23376f81f7
Removed unused variable and updated memory calculation to use ansible_memtotal_mb for more accurate results.
gitea-actions bot reviewed 2026-02-15 17:39:17 +01:00
gitea-actions bot left a comment

Review Summary

  • defaults/main.yml: Removed hardcoded memory limit for log2ram_host_memtotal_mb configuration. This change may increase the system's flexibility, but it could potentially lead to excessive RAM usage if not properly managed. It is recommended to set an appropriate default value or use a dynamic calculation based on available system resources.
  • tasks/ram.yml: Changes Calculate the RAM size using ansible_memtotal_mb instead of log2ram_host_memtotal_mb. This could potentially lead to incorrect calculations if the host and the fact variables differ.
# Review Summary * **defaults/main.yml**: Removed hardcoded memory limit for `log2ram_host_memtotal_mb` configuration. This change may increase the system's flexibility, but it could potentially lead to excessive RAM usage if not properly managed. It is recommended to set an appropriate default value or use a dynamic calculation based on available system resources. * **tasks/ram.yml**: Changes Calculate the RAM size using `ansible_memtotal_mb` instead of `log2ram_host_memtotal_mb`. This could potentially lead to incorrect calculations if the host and the fact variables differ.
@@ -38,4 +38,3 @@
log2ram_min_size_mb: 128
log2ram_max_size_mb: 1024
log2ram_host_memtotal_mb: "{{ host_memtotal_mb | default(4086) }}"

[Score: 3] Removing hardcoded memory limit for log2ram_host_memtotal_mb could potentially lead to excessive RAM usage if not properly managed. It is recommended to set an appropriate default value or use a dynamic calculation based on available system resources.

[Score: 3] Removing hardcoded memory limit for log2ram_host_memtotal_mb could potentially lead to excessive RAM usage if not properly managed. It is recommended to set an appropriate default value or use a dynamic calculation based on available system resources.
gitea-actions bot added the sourceci-pass labels 2026-02-15 17:40:12 +01:00
Jose merged commit e965fcaf7f into main 2026-02-15 17:40:30 +01:00
Sign in to join this conversation.