Skip to content

Commit

Permalink
Ensure retrieval of hugepage size in check mode (#814)
Browse files Browse the repository at this point in the history
This update adds check_mode: false to the tasks retrieving Hugepagesize and HugePages_Total values from /proc/meminfo. This ensures these tasks are executed even in Ansible’s check mode, allowing necessary data to be consistently retrieved for subsequent calculations.
  • Loading branch information
vitabaks authored Nov 22, 2024
1 parent 9989701 commit 471d474
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions automation/roles/pre-checks/tasks/huge_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@
- name: "HugePages | Get Hugepagesize value from /proc/meminfo"
ansible.builtin.command: "awk '/Hugepagesize/ {print $2}' /proc/meminfo"
changed_when: false
check_mode: false
register: huge_page_size
when:
- shared_buffers_gb | default(0) | int >= (min_shared_buffers_gb | default(8))

- name: "HugePages | Get HugePages_Total value from /proc/meminfo"
ansible.builtin.command: "awk '/HugePages_Total/ {print $2}' /proc/meminfo"
changed_when: false
check_mode: false
register: huge_pages_total
when:
- shared_buffers_gb | default(0) | int >= (min_shared_buffers_gb | default(8))
Expand Down

0 comments on commit 471d474

Please sign in to comment.