fix: Sudo for limit changes

This commit is contained in:
Laur Ivan 2023-04-28 18:14:53 +02:00
parent ec46971364
commit f9a98017a3

View File

@ -33,6 +33,7 @@
# Type "-" for enforcing both soft and hard resource limits together for more details read `man limits.conf`. # Type "-" for enforcing both soft and hard resource limits together for more details read `man limits.conf`.
- { limit_type: '-', limit_item: 'nofile', value: "{{ sonarqube_nofile }}" } - { limit_type: '-', limit_item: 'nofile', value: "{{ sonarqube_nofile }}" }
- { limit_type: '-', limit_item: 'nproc', value: "{{ sonarqube_nproc }}" } - { limit_type: '-', limit_item: 'nproc', value: "{{ sonarqube_nproc }}" }
become: true
- name: "SONARQUBE | Set up the max files" - name: "SONARQUBE | Set up the max files"
sysctl: sysctl:
@ -40,10 +41,12 @@
value: "{{ sonarqube_fs_file_max }}" value: "{{ sonarqube_fs_file_max }}"
state: present state: present
reload: yes reload: yes
become: true
- name: "SONARQUBE | Set up the VM max_map_count" - name: "SONARQUBE | Set up the VM max_map_count"
sysctl: sysctl:
name: vm.max_map_count name: vm.max_map_count
value: "{{ sonarqube_vm_max_map_count }}" value: "{{ sonarqube_vm_max_map_count }}"
state: present state: present
reload: yes reload: yes
become: true