Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions ansible/tasks/setup-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,6 @@
when:
- (debpkg_mode or nixpkg_mode)
block:
# Set Sysctl params for restarting the OS on OOM after 10
- name: Set vm.panic_on_oom=1
ansible.builtin.sysctl:
name: 'vm.panic_on_oom'
reload: true
state: 'present'
value: '1'

- name: Set kernel.panic=10
ansible.builtin.sysctl:
name: 'kernel.panic'
Expand Down
17 changes: 15 additions & 2 deletions ansible/tasks/setup-tuned.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Install and configure tuned when stage2_nix
- name: Install and configure tuned
when:
- (stage2_nix or nixpkg_mode)
- (stage2_nix or nixpkg_mode or debpkg_mode)
block:
- name: Install tuned
ansible.builtin.apt:
Expand Down Expand Up @@ -135,6 +135,19 @@
state: 'present'
value: '3000,3001,8085,9122,9187,9999'

- name: tuned - Set vm.panic_on_oom
become: true
community.general.ini_file:
create: true
group: 'root'
mode: '0644'
no_extra_spaces: true
option: 'vm.panic_on_oom'
path: '/etc/tuned/profiles/postgresql/tuned.conf'
section: 'sysctl'
state: 'present'
value: 1

- name: tuned - Enable zswap if swap is present
when:
- ansible_facts['swaptotal_mb'] > 0
Expand Down
Loading