-
Notifications
You must be signed in to change notification settings - Fork 10
/
ansible_install.yml
80 lines (78 loc) · 2.22 KB
/
ansible_install.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
---
- 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: Reboot target
tags:
- quick
shell: reboot