This commit is contained in:
Tiara Rodney 2026-03-14 05:38:45 +01:00
commit 883f31932e
No known key found for this signature in database
GPG key ID: 5CD8EC1D46106723
169 changed files with 5676 additions and 0 deletions

View file

@ -0,0 +1,37 @@
---
-
name: Install zram-tools
apt:
name: zram-tools
state: present
-
name: Configure zram
copy:
dest: /etc/default/zramswap
content: |
ALGO={{ zram_algorithm | default('zstd') }}
PERCENT={{ zram_percent | default(50) }}
PRIORITY={{ zram_priority | default(100) }}
mode: '0644'
notify: restart zramswap
-
name: Enable zramswap service
systemd:
name: zramswap
enabled: true
state: started
-
name: Disable file-backed swap if present
command: swapoff /swapfile
failed_when: false
changed_when: false
-
name: Remove file-backed swap from fstab
lineinfile:
path: /etc/fstab
line: "/swapfile none swap sw 0 0"
state: absent