Enable zram on EL9
This commit is contained in:
parent
1a60112b78
commit
2619dc0db7
4 changed files with 31 additions and 0 deletions
9
roles/el/files/zram-generator.conf
Normal file
9
roles/el/files/zram-generator.conf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# This config file enables a /dev/zram0 device with the default settings:
|
||||||
|
# — size — same as available RAM or 8GB, whichever is less
|
||||||
|
# — compression — most likely lzo-rle
|
||||||
|
#
|
||||||
|
# To disable, uninstall zram-generator-defaults or create empty
|
||||||
|
# /etc/systemd/zram-generator.conf file.
|
||||||
|
[zram0]
|
||||||
|
zram-fraction = 1.0
|
||||||
|
max-zram-size = 8192
|
|
@ -21,3 +21,4 @@
|
||||||
- import_tasks: solokeys.yml
|
- import_tasks: solokeys.yml
|
||||||
- import_tasks: packagekit.yml
|
- import_tasks: packagekit.yml
|
||||||
- import_tasks: vscode.yml
|
- import_tasks: vscode.yml
|
||||||
|
- import_tasks: zram.yml
|
||||||
|
|
|
@ -71,4 +71,5 @@
|
||||||
- podman
|
- podman
|
||||||
- toolbox
|
- toolbox
|
||||||
- wireguard-tools
|
- wireguard-tools
|
||||||
|
- zram-generator
|
||||||
when: ansible_distribution_major_version == '9'
|
when: ansible_distribution_major_version == '9'
|
||||||
|
|
20
roles/el/tasks/zram.yml
Normal file
20
roles/el/tasks/zram.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
# Copyright 2021 Anthony Perkins
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Install zram-generator.conf
|
||||||
|
become: true
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: zram-generator.conf
|
||||||
|
dest: /etc/systemd/zram-generator.conf
|
Loading…
Reference in a new issue