diff --git a/ansible/tasks/setup-system.yml b/ansible/tasks/setup-system.yml index 87c08688d..f9e872c62 100644 --- a/ansible/tasks/setup-system.yml +++ b/ansible/tasks/setup-system.yml @@ -154,17 +154,6 @@ owner: 'root' group: 'root' -- name: Execute tasks when (debpkg_mode or nixpkg_mode) - when: - - (debpkg_mode or nixpkg_mode) - block: - - name: Set kernel.panic=10 - ansible.builtin.sysctl: - name: 'kernel.panic' - reload: true - state: 'present' - value: '10' - - name: set hosts file ansible.builtin.copy: content: | diff --git a/ansible/tasks/setup-tuned.yml b/ansible/tasks/setup-tuned.yml index 02db21b78..72d8792d3 100644 --- a/ansible/tasks/setup-tuned.yml +++ b/ansible/tasks/setup-tuned.yml @@ -148,6 +148,21 @@ state: 'present' value: 1 + - name: tuned - Set kernel.panic=10 + become: true + community.general.ini_file: + create: true + group: 'root' + mode: '0644' + no_extra_spaces: true + option: 'kernel.panic' + path: '/etc/tuned/profiles/postgresql/tuned.conf' + section: 'sysctl' + state: 'present' + value: 10 + when: + - (debpkg_mode or nixpkg_mode) + - name: tuned - Enable zswap if swap is present when: - ansible_facts['swaptotal_mb'] > 0