From 6dc43e2d2385d11be47822afc6c80e6838621e89 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 29 Nov 2022 16:02:44 +0100 Subject: [PATCH] copr: disable zram0 swap We maintain swap partitions ourselves, and zram0 complicates our lives for multi-swap use-cases: https://bugzilla.redhat.com/show_bug.cgi?id=2051154 --- tasks/swap.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tasks/swap.yml b/tasks/swap.yml index 3dcf585bfa..1816f4388f 100644 --- a/tasks/swap.yml +++ b/tasks/swap.yml @@ -8,12 +8,16 @@ dest: "{{ swap_file_path }}" force: no register: swap_touch + tags: + - swap - name: On BTRFS we need NoCOW file: path: "{{ swap_file_path }}" attr: +C when: swap_touch.changed + tags: + - swap - name: Create swap file command: @@ -71,5 +75,22 @@ - swap notify: restart swap.swap +- name: remove zram-generator-defaults + package: + name: zram-generator-defaults + state: absent + register: remove_zram_generator + tags: + - swap.file.dropzrampackage + - swap + +- name: disable zram0 + shell: swapoff /dev/zram0 + tags: + - swap + - swap.file.swapoffzram + when: + - remove_zram_generator.changed + # - name: Start swap.swap service # service: state=started enabled=yes name="swap.swap"