refactor ♻️: Refactor task naming to include role context #36

Merged
Jose merged 2 commits from dev into main 2026-02-15 18:23:54 +01:00
Owner

Updated task names to explicitly include the role context, improving clarity and consistency across the system.

Updated task names to explicitly include the role context, improving clarity and consistency across the system.
Jose added 2 commits 2026-02-15 18:22:50 +01:00
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
e347af8569
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.
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
63b5215e8a
Updated task names to explicitly include the role context, improving clarity and consistency across the system.
gitea-actions bot reviewed 2026-02-15 18:23:04 +01:00
gitea-actions bot left a comment

Review Summary

  • tasks/ram.yml: This change introduces a more efficient calculation of the _calculated_size_mb variable by removing an unnecessary step. The variable is now directly calculated using the ansible_memtotal_mb, log2ram_ram_percent, and division operations. The previous code used two variables, _total_ram_mb and _calculated_size_mb, to store intermediate results before performing the calculation. This can potentially lead to issues if these variables are inadvertently reused later in the playbook. By removing this step, the code becomes cleaner and easier to understand. However, it is worth noting that this change does not affect the logic, security, performance, or maintainability significantly. The score for this change would be a 2 (Minor Optimization Suggestion). Here's how you can rephrase the comment:
# Review Summary * **tasks/ram.yml**: This change introduces a more efficient calculation of the `_calculated_size_mb` variable by removing an unnecessary step. The variable is now directly calculated using the `ansible_memtotal_mb`, `log2ram_ram_percent`, and division operations. The previous code used two variables, `_total_ram_mb` and `_calculated_size_mb`, to store intermediate results before performing the calculation. This can potentially lead to issues if these variables are inadvertently reused later in the playbook. By removing this step, the code becomes cleaner and easier to understand. However, it is worth noting that this change does not affect the logic, security, performance, or maintainability significantly. The score for this change would be a **2** (Minor Optimization Suggestion). Here's how you can rephrase the comment:
@@ -11,3 +13,4 @@
_calculated_size_mb: "{{ (ansible_memtotal_mb * log2ram_ram_percent / 100) | int }}"
log2ram_size_mb: >-
{{
[log2ram_min_size_mb,

[Lines 7-16] [Score: 2] Removed intermediate variables for a more efficient calculation of _calculated_size_mb.

[Lines 7-16] [Score: 2] Removed intermediate variables for a more efficient calculation of _calculated_size_mb.
gitea-actions bot added the sourceci-pass labels 2026-02-15 18:23:30 +01:00
Jose merged commit d7d078c5aa into main 2026-02-15 18:23:54 +01:00
Sign in to join this conversation.