Add DKMS, install a third-party nintendo controller driver

This commit is contained in:
Salt 2020-07-27 00:52:18 -05:00
parent b705ef78d5
commit 82c407beb3
4 changed files with 48 additions and 0 deletions

View 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 ]

View File

@ -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

View 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
View 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