111 lines
2.3 KiB
YAML
111 lines
2.3 KiB
YAML
- 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'
|
|
}
|
|
|
|
- name: remove the mkinitcpio directories
|
|
become: true
|
|
file:
|
|
path: '{{ item }}'
|
|
state: absent
|
|
loop:
|
|
- /etc/mkinitcpio.conf.d
|
|
- /etc/mkinitcpio.d
|
|
|
|
- name: recreate the mkinitcpio directories
|
|
become: true
|
|
file:
|
|
path: '{{ item }}'
|
|
state: directory
|
|
mode: 755
|
|
loop:
|
|
- /etc/mkinitcpio.conf.d
|
|
- /etc/mkinitcpio.d
|
|
|
|
- name: copy mkinitcpio configuration files
|
|
become: true
|
|
template:
|
|
src: '{{ item.src }}'
|
|
dest: '{{ item.dest }}'
|
|
loop:
|
|
- {
|
|
src: 'templates/desktop/mkinitcpio/99-modules.conf.j2',
|
|
dest: '/etc/mkinitcpio.conf.d/99-amdgpu.conf'
|
|
}
|
|
- {
|
|
src: 'templates/desktop/mkinitcpio/linux.preset.j2',
|
|
dest: '/etc/mkinitcpio.d/linux.preset'
|
|
}
|
|
- {
|
|
src: 'templates/desktop/mkinitcpio/linux-lts.preset.j2',
|
|
dest: '/etc/mkinitcpio.d/linux-lts.preset'
|
|
}
|
|
|
|
|
|
- name: remove old initramfs files
|
|
become: true
|
|
file:
|
|
path: '{{ item }}'
|
|
state: absent
|
|
loop:
|
|
- /boot/initramfs-linux-lts-fallback.img
|
|
- /boot/initramfs-linux-fallback.img
|
|
|
|
- name: regenerate initramfs images
|
|
become: true
|
|
command: 'mkinitcpio --allpresets'
|
|
register: mkinitcpio_stats
|
|
|
|
- name: log mkinitcpio stdout
|
|
debug:
|
|
var: mkinitcpio_stats.stdout_lines
|
|
|
|
# TODO: provision systemd-boot
|