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
This commit is contained in:
Pavel Raiskup 2022-11-29 16:02:44 +01:00
parent b69b07c110
commit 6dc43e2d23

View file

@ -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"