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:
parent
b69b07c110
commit
6dc43e2d23
1 changed files with 21 additions and 0 deletions
|
@ -8,12 +8,16 @@
|
||||||
dest: "{{ swap_file_path }}"
|
dest: "{{ swap_file_path }}"
|
||||||
force: no
|
force: no
|
||||||
register: swap_touch
|
register: swap_touch
|
||||||
|
tags:
|
||||||
|
- swap
|
||||||
|
|
||||||
- name: On BTRFS we need NoCOW
|
- name: On BTRFS we need NoCOW
|
||||||
file:
|
file:
|
||||||
path: "{{ swap_file_path }}"
|
path: "{{ swap_file_path }}"
|
||||||
attr: +C
|
attr: +C
|
||||||
when: swap_touch.changed
|
when: swap_touch.changed
|
||||||
|
tags:
|
||||||
|
- swap
|
||||||
|
|
||||||
- name: Create swap file
|
- name: Create swap file
|
||||||
command:
|
command:
|
||||||
|
@ -71,5 +75,22 @@
|
||||||
- swap
|
- swap
|
||||||
notify: restart swap.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
|
# - name: Start swap.swap service
|
||||||
# service: state=started enabled=yes name="swap.swap"
|
# service: state=started enabled=yes name="swap.swap"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue