feat : Add configuration options for log2ram and journald settings #30

Merged
Jose merged 4 commits from dev into main 2026-02-15 09:48:03 +01:00
Owner

Refactored the task name to include the 'ram' prefix for better clarity and consistency.

Refactored the task name to include the 'ram' prefix for better clarity and consistency.
Jose added 4 commits 2026-02-15 09:44:11 +01:00
feat : Add configuration options for log2ram and journald settings
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 12s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 5s
6aaa186c1f
This commit introduces new features that allow users to configure log2ram and journald settings. It includes handlers for log2ram, journald, and a task to configure RAM usage. Additionally, a new role is added for installing and configuring log2ram on Debian systems.
refactor ♻️: Refactor task structure and update configuration method in ram.yml
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
83febca09a
This commit refactors the task structure in `ram.yml` and updates the configuration method to improve readability and maintainability.
refactor ♻️: Refactor installation logic and configure settings using loops
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
7c664dfd45
This refactoring simplifies the installation process by utilizing loops to handle repetitive tasks, improving readability and maintainability of the code.
refactor ♻️: Rename task 'Configure log2ram settings' to 'ram | Configure log2ram settings'
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 13s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 5s
ai-reviews / Review PR (pull_request) Successful in 27s
PR check / Gitleaks (pull_request) Successful in 4s
PR check / lint tests (pull_request) Successful in 13s
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
061f26aad5
Refactored the task name to include the 'ram' prefix for better clarity and consistency.
gitea-actions bot reviewed 2026-02-15 09:44:38 +01:00
gitea-actions bot left a comment

Review Summary

  • defaults/main.yml: Changes in the configuration file (defaults/main.yml) have been made to adjust various system settings for performance, memory management, and journaling.
  • handlers/main.yml: Summary: New Ansible tasks added to restart log2ram and journald.
  • tasks/main.yml: Addition of new tasks for configuring RAM usage
  • tasks/ram.yml: The provided code snippet is a Ansible playbook for managing RAM and setting up log2ram on Debian-based systems. Here's the review: Overall, the code looks good with minimal issues. The playbook sets up log2ram on Debian systems in an organized manner. LGTM (with suggested improvements)
# Review Summary * **defaults/main.yml**: Changes in the configuration file (defaults/main.yml) have been made to adjust various system settings for performance, memory management, and journaling. * **handlers/main.yml**: **Summary:** New Ansible tasks added to restart `log2ram` and `journald`. * **tasks/main.yml**: Addition of new tasks for configuring RAM usage * **tasks/ram.yml**: The provided code snippet is a Ansible playbook for managing RAM and setting up log2ram on Debian-based systems. Here's the review: Overall, the code looks good with minimal issues. The playbook sets up log2ram on Debian systems in an organized manner. LGTM (with suggested improvements)
@@ -23,0 +30,4 @@
- name: Restart journald
ansible.builtin.systemd:
name: systemd-journald
state: restarted

[Lines 24-33] [Score: 3] Adding new handlers may require testing to ensure they don't interfere with existing functionality. Always consider maintainability and potential side effects when extending playbooks.

[Lines 24-33] [Score: 3] Adding new handlers may require testing to ensure they don't interfere with existing functionality. Always consider maintainability and potential side effects when extending playbooks.
@@ -41,1 +41,4 @@
ansible.builtin.import_tasks: kernel.yml
- name: Configure ram usage
ansible.builtin.import_tasks: ram.yml

[Lines 43-44] [Score: 2] Potential maintainability issue. Adding new tasks to an existing playbook without a clear reason or context may make the code less readable and harder to understand for other team members. It is recommended to keep the main playbook focused on high-level tasks, and delegate specific sub-tasks to separate files if necessary.

[Lines 43-44] [Score: 2] Potential maintainability issue. Adding new tasks to an existing playbook without a clear reason or context may make the code less readable and harder to understand for other team members. It is recommended to keep the main playbook focused on high-level tasks, and delegate specific sub-tasks to separate files if necessary.
@@ -0,0 +1,102 @@
---

[Score: 3] The YAML playbook starts with a single hyphen, which is a bad practice as it may lead to confusion or errors in interpreting the file. Use three hyphens instead (---).

Context: Line 20: + log2ram_size: "{{ log2ram_size_mb }}M"
StartLine: 20
EndLine: 21
Comment: [Score: 2] Although not a critical issue, it is important to maintain consistency in naming conventions. Here, log2ram_size is defined in MB but the variable name does not explicitly indicate that it represents the size in Megabytes. Consider renaming this variable as log2ram_size_in_mb.

Context: Line 57: + creates: /usr/local/bin/log2ram
StartLine: 57
EndLine: 58
Comment: [Score: 3] Although the creates directive makes the command idempotent by checking for the binary, it might not be sufficient if you want to ensure that the command has been successfully installed and is executable. You may consider adding a check to verify the file's permissions and executability.

[Score: 3] The YAML playbook starts with a single hyphen, which is a bad practice as it may lead to confusion or errors in interpreting the file. Use three hyphens instead (---). Context: Line 20: + log2ram_size: "{{ log2ram_size_mb }}M" StartLine: 20 EndLine: 21 Comment: [Score: 2] Although not a critical issue, it is important to maintain consistency in naming conventions. Here, `log2ram_size` is defined in MB but the variable name does not explicitly indicate that it represents the size in Megabytes. Consider renaming this variable as `log2ram_size_in_mb`. Context: Line 57: + creates: /usr/local/bin/log2ram StartLine: 57 EndLine: 58 Comment: [Score: 3] Although the `creates` directive makes the command idempotent by checking for the binary, it might not be sufficient if you want to ensure that the command has been successfully installed and is executable. You may consider adding a check to verify the file's permissions and executability.
gitea-actions bot added the sourceci-pass labels 2026-02-15 09:45:03 +01:00
Jose changed title from refactor ♻️: Rename task 'Configure log2ram settings' to 'ram | Configure log2ram settings' to feat : Add configuration options for log2ram and journald settings 2026-02-15 09:47:35 +01:00
Jose added the enhancement label 2026-02-15 09:47:54 +01:00
Jose merged commit e774265fb4 into main 2026-02-15 09:48:03 +01:00
Sign in to join this conversation.