Add desktop sysctl/modprobe config files

This commit is contained in:
Sonny Bakker 2024-09-04 09:18:01 +02:00
parent 6e88c23a9d
commit a5ed57f910
5 changed files with 65 additions and 1 deletions

View file

@ -66,6 +66,57 @@
name: fstrim.timer
enabled: true
- block:
- name: remove the sysctl.d directory
become: true
file:
path: /etc/sysctl.d
state: absent
- name: recreate the sysctl.d directory
become: true
file:
path: /etc/sysctl.d
state: directory
mode: 755
- name: copy sysctl files
become: true
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
loop:
- {
src: 'templates/desktop/sysctl/99-sysrq.conf.j2',
dest: '/etc/sysctl.d/99-sysrq.conf'
}
- {
src: 'templates/desktop/sysctl/98-forward.conf.j2',
dest: '/etc/sysctl.d/98-foward.conf'
}
notify: reload sysctl configuration
- name: remove the modprobe.d directory
become: true
file:
path: /etc/modprobe.d
state: absent
- name: recreate the modprobe.d directory
become: true
file:
path: /etc/modprobe.d
state: directory
mode: 755
- name: copy modprobe files
become: true
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
loop:
- {
src: 'templates/desktop/modprobe/99-amdgpu.conf.j2',
dest: '/etc/modprobe.d/99-amdgpu.conf'
}
when: platform == 'desktop'
# TODO: set fan settings to `quiet` with smbios-thermal-ctl
- name: remove old configuration files
@ -82,4 +133,4 @@
state: absent
owner: root
group: root
when: platform == "laptop"
when: platform == 'laptop'