diff --git a/host_vars/lists.archlinux.org/misc b/host_vars/lists.archlinux.org/misc index 13494d3e6392dd0b7cc499703a447bd56a2eea44..3bd31fe7836ec77bc1295f5ea8eb7647fc6330bf 100644 --- a/host_vars/lists.archlinux.org/misc +++ b/host_vars/lists.archlinux.org/misc @@ -1,5 +1,6 @@ --- filesystem: btrfs ipv4_address: 95.217.236.249 +zram_fraction: 1.0 wireguard_address: 10.0.0.34 wireguard_public_key: t6Er4qAMe/lWNnAByWdXhbUwXKYfj9CkkJgMp28UQl8= diff --git a/roles/common/files/zram-generator.conf b/roles/common/files/zram-generator.conf deleted file mode 100644 index c604b0b15bfda33a9cb4cc9989cf0e66bd65f246..0000000000000000000000000000000000000000 --- a/roles/common/files/zram-generator.conf +++ /dev/null @@ -1,2 +0,0 @@ -[zram0] -max-zram-size = none diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 52d8a865d6e8707b22da62d171e2cd9bae5bf88a..b0580ff3db2836ae281054b2f67d691acd26c14f 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -139,7 +139,7 @@ when: enable_zram_swap - name: install zram-generator config for zram - copy: src=zram-generator.conf dest=/etc/systemd/zram-generator.conf owner=root group=root mode=0644 + template: src=zram-generator.conf dest=/etc/systemd/zram-generator.conf owner=root group=root mode=0644 notify: - restart systemd-zram-setup@zram0 when: enable_zram_swap diff --git a/roles/common/templates/zram-generator.conf b/roles/common/templates/zram-generator.conf new file mode 100644 index 0000000000000000000000000000000000000000..16f1761ce787aefd9b3bdf1b8b894e5f0852392d --- /dev/null +++ b/roles/common/templates/zram-generator.conf @@ -0,0 +1,5 @@ +[zram0] +max-zram-size = none +{% if zram_fraction is defined %} +zram-fraction = {{ zram_fraction }} +{% endif %}