setup playbook to install xone driver
This commit is contained in:
parent
571f82bad3
commit
b3c1e7a08f
|
@ -0,0 +1,5 @@
|
||||||
|
[defaults]
|
||||||
|
ask_pass = true
|
||||||
|
|
||||||
|
[privilege_escalation]
|
||||||
|
become_ask_pass = true
|
|
@ -0,0 +1,2 @@
|
||||||
|
[steamdeck]
|
||||||
|
steamdeck.local ansible_user=deck ansible_become_method=sudo
|
|
@ -0,0 +1,50 @@
|
||||||
|
- name: Disable read-only filesystem
|
||||||
|
become: true
|
||||||
|
command: steamos-readonly disable
|
||||||
|
|
||||||
|
- name: Check if pacman keyring exists
|
||||||
|
stat:
|
||||||
|
path: /etc/pacman.d/gnupg/secring.gpg
|
||||||
|
register: keyring_dir
|
||||||
|
|
||||||
|
- name: Initialize pacman keyring
|
||||||
|
become: true
|
||||||
|
shell: pacman-key --init && pacman-key --populate
|
||||||
|
when: not keyring_dir.stat.exists
|
||||||
|
|
||||||
|
# start setup sudoer
|
||||||
|
- name: Allow passwordless sudo for the duration of the playbook
|
||||||
|
become: true
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/sudoers.d/zzz-passwordless-wheel
|
||||||
|
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
|
||||||
|
create: yes
|
||||||
|
mode: 0644
|
||||||
|
validate: '/usr/sbin/visudo -cf %s'
|
||||||
|
# end setup sudoer
|
||||||
|
|
||||||
|
# start install xone
|
||||||
|
- name: Install required packages for building kernel module
|
||||||
|
become: true
|
||||||
|
pacman:
|
||||||
|
update_cache: true
|
||||||
|
name:
|
||||||
|
- base-devel
|
||||||
|
- https://steamdeck-packages.steamos.cloud/archlinux-mirror/jupiter-main/os/x86_64/linux-{{ ansible_kernel | regex_search('neptune-[0-9]+$') }}-headers-{{ ansible_kernel | regex_search('^[0-9]+\.[0-9]+\.[0-9]+') }}.{{ ansible_kernel | regex_search('valve[0-9]+-[0-9]+') }}-x86_64.pkg.tar.zst # linux-headers
|
||||||
|
|
||||||
|
- name: Install xone-dkms-git xbox one accessories driver
|
||||||
|
aur:
|
||||||
|
name: xone-dkms-git
|
||||||
|
# end install xone
|
||||||
|
|
||||||
|
# start cleanup sudoer
|
||||||
|
- name: Disable passwordless sudo
|
||||||
|
become: true
|
||||||
|
file:
|
||||||
|
path: /etc/sudoers.d/zzz-passwordless-wheel
|
||||||
|
state: absent
|
||||||
|
# end cleanup sudoer
|
||||||
|
|
||||||
|
- name: Enable read-only filesystem
|
||||||
|
become: true
|
||||||
|
command: steamos-readonly enable
|
Loading…
Reference in New Issue