Add DKMS, install a third-party nintendo controller driver
This commit is contained in:
parent
b705ef78d5
commit
82c407beb3
13
roles/desktop/tasks/dkms.yml
Normal file
13
roles/desktop/tasks/dkms.yml
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: Install DKMS modules
|
||||
block:
|
||||
- name: Install hid-nintendo
|
||||
include_role:
|
||||
name: dkms
|
||||
vars:
|
||||
dkms_repo: "https://github.com/nicman23/dkms-hid-nintendo"
|
||||
dkms_name: "nintendo-1.0"
|
||||
become: yes
|
||||
tags: [ dkms ]
|
@ -39,6 +39,9 @@
|
||||
- { src: "switch-rcm.rules", dest: "/etc/udev/rules.d/50-switch-rcm.rules", mode: "0644" }
|
||||
notify: reload udev
|
||||
tags: [ udev ]
|
||||
- name: Configure custom kernel modules
|
||||
include_tasks: dkms.yml
|
||||
tags: [ dkms ]
|
||||
- name: Configure local Apache
|
||||
include_tasks: apache.yml
|
||||
- name: Configure SSH
|
||||
|
9
roles/dkms/handlers/main.yml
Normal file
9
roles/dkms/handlers/main.yml
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: dkms autoinstall
|
||||
command:
|
||||
argv:
|
||||
- /usr/sbin/dkms
|
||||
- autoinstall
|
||||
become: yes
|
23
roles/dkms/tasks/main.yml
Normal file
23
roles/dkms/tasks/main.yml
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
---
|
||||
- name: Install DKMS module
|
||||
block:
|
||||
- name: Install packages
|
||||
apt:
|
||||
name:
|
||||
- dkms
|
||||
- name: Clone repository
|
||||
git:
|
||||
repo: "{{ dkms_repo }}"
|
||||
dest: "/usr/src/{{ dkms_name }}"
|
||||
register: r
|
||||
- name: Add DKMS module
|
||||
command:
|
||||
argv:
|
||||
- /usr/sbin/dkms
|
||||
- add
|
||||
- "/usr/src/{{ dkms_name }}"
|
||||
notify: dkms autoinstall
|
||||
when: r is changed
|
||||
become: yes
|
Loading…
Reference in New Issue
Block a user