Add desktop sysctl/modprobe config files
This commit is contained in:
parent
6e88c23a9d
commit
a5ed57f910
5 changed files with 65 additions and 1 deletions
|
|
@ -85,3 +85,7 @@
|
|||
enabled: true
|
||||
scope: user
|
||||
daemon-reload: true
|
||||
|
||||
- name: reload sysctl configuration
|
||||
become: true
|
||||
command: 'sysctl --system'
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
5
templates/desktop/modprobe/99-amdgpu.conf.j2
Normal file
5
templates/desktop/modprobe/99-amdgpu.conf.j2
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
# disable Panel Self Refresh for 6.10
|
||||
# see https://bbs.archlinux.org/viewtopic.php?pid=2191514#p2191514
|
||||
options amdgpu dcdebugmask=0x12
|
||||
2
templates/desktop/sysctl/98-forward.conf.j2
Normal file
2
templates/desktop/sysctl/98-forward.conf.j2
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# {{ ansible_managed }}
|
||||
net.ipv4.ip_forward = 1
|
||||
2
templates/desktop/sysctl/99-sysrq.conf.j2
Normal file
2
templates/desktop/sysctl/99-sysrq.conf.j2
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# {{ ansible_managed }}
|
||||
kernel.sysrq = 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue