generated from nicolabelluti/template-ansible
Added users role to manage the playbook as root and remove admin privileges from deck
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
- name: Rebuild initramfs and limine entries
|
||||
become: true
|
||||
ansible.builtin.command: limine-mkinitcpio
|
||||
changed_when: true
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# default. 3959290 pages of 4K = ~15.1 GiB
|
||||
# ttm.page_pool_size - must match pages_limit or allocations can fail
|
||||
- name: Add BC-250 kernel parameters
|
||||
become: true
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/default/limine
|
||||
marker: '# {mark} ANSIBLE bc250 memory'
|
||||
@@ -17,7 +16,6 @@
|
||||
|
||||
# lz4 must be in the initramfs for zswap to use it from early boot.
|
||||
- name: Add lz4 to the initramfs modules
|
||||
become: true
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/mkinitcpio.conf
|
||||
regexp: '^MODULES='
|
||||
@@ -27,14 +25,12 @@
|
||||
# CachyOS ships a udev rule that disables zswap when zram comes up.
|
||||
# An empty file with the same name overrides it.
|
||||
- name: Neutralise the CachyOS zram udev rule
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
content: ''
|
||||
dest: /etc/udev/rules.d/30-zram.rules
|
||||
mode: '0644'
|
||||
|
||||
- name: Lower swappiness
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
content: vm.swappiness=10
|
||||
dest: /etc/sysctl.d/99-bc250.conf
|
||||
@@ -42,7 +38,6 @@
|
||||
register: sysctl_conf
|
||||
|
||||
- name: Apply swappiness now
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- sysctl
|
||||
@@ -51,7 +46,6 @@
|
||||
changed_when: true
|
||||
|
||||
- name: Create the swap subvolume
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- btrfs
|
||||
@@ -62,7 +56,6 @@
|
||||
creates: /swap
|
||||
|
||||
- name: Create the swapfile
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- btrfs
|
||||
@@ -77,7 +70,6 @@
|
||||
creates: /swap/swapfile
|
||||
|
||||
- name: Add the swapfile to fstab
|
||||
become: true
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/fstab
|
||||
regexp: '^/swap/swapfile'
|
||||
@@ -87,6 +79,5 @@
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Reboot to apply the new kernel parameters
|
||||
become: true
|
||||
ansible.builtin.reboot:
|
||||
reboot_timeout: 600
|
||||
|
||||
Reference in New Issue
Block a user