-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathansible_install_HDMI-Audio-Fix.yml
90 lines (88 loc) · 2.63 KB
/
ansible_install_HDMI-Audio-Fix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
- name: Install McAirPos to allow playing MakeCode Arcade games
gather_facts: no
hosts: all
vars:
home_pi: /home/pi
git_rb: ../McAirpos/Recalbox8.0
root_sd: /sd
es_cfg: "{{ lookup('file', git_rb + '/systemlist.xml_MakeCode_RB') }}"
rb_dot_es: "/recalbox/share_init/system/.emulationstation"
mcairpos: /home/pi/McAirpos
tasks:
- name: Allow writing to root so we can make changes
tags:
- quick
shell: mount -o remount,rw /
- name: Create /home/pi
file:
path: "{{ mcairpos }}"
state: directory
- name: Chown /sd folder for controls
file:
path: "{{ root_sd }}"
# owner: pi
# group: pi
mode: '0755'
state: directory
- name: Configure MakeCode controls
copy:
src: "../McAirpos/MakeCode/sd/"
dest: "{{ root_sd }}"
- name: Compress the McAirpos files
tags:
- quick
shell: tar -czf ../McAirpos.tar.gz ../McAirpos
delegate_to: localhost
- name: Transfer archive and create McAirpos directory
copy:
src: "../McAirpos.tar.gz"
dest: "{{ mcairpos }}"
mode: '0755'
- name: Decompress archive at target
tags:
- quick
shell: tar -zxf /home/pi/McAirpos/McAirpos.tar.gz -C /home/pi/McAirpos
- name: Add MakeCode to available systems
tags:
- quick
blockinfile:
marker: "<!-- {mark} added by Ansible for Makecode Aracde -->"
backup: no
path: "{{ rb_dot_es }}/systemlist.xml"
state: present
insertbefore: "</systemList>"
block: "{{ es_cfg }}"
- name: Add MakeCode Theme
tags:
- quick
copy:
src: "{{ git_rb }}/themes/recalbox-next/makecode"
dest: "{{ rb_dot_es }}/themes/recalbox-next"
- name: Create MakeCode Arcade ROMS folder
file:
path: "/recalbox/share/roms/makecode"
state: directory
mode: '0755'
- name: Symlink MakeCode launcher
tags:
- quick
file:
src: "{{ mcairpos }}/McAirpos/launCharc/launCharc"
dest: /usr/bin/launCharc
mode: '0755'
state: link
- name: Add support for HDMI Audio 1/2 - alsabase.conf
copy:
src: "../McAirpos/Recalbox8.0/etc/modprobe.d/alsa-base.conf"
dest: /etc/modprobe.d/alsa-base.conf
backup: yes
- name: Add support for HDMI Audio 2/2 - vc4-hdmi.conf
copy:
src: "../McAirpos/Recalbox8.0/usr/share/alsa/cards/vc4-hdmi.conf"
dest: /usr/share/alsa/cards/vc4-hdmi.conf
backup: yes
- name: Reboot target
tags:
- quick
shell: reboot