diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-25 09:52:36 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-25 09:52:36 -0400 |
commit | 95b73daa36b23565a8566f71f9b202d3459b685f (patch) | |
tree | cb17b021be70e7868d0ec235a761f0ecdc80f3f2 /roles/services/game_server/handlers |
Diffstat (limited to 'roles/services/game_server/handlers')
-rw-r--r-- | roles/services/game_server/handlers/main.yml | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/roles/services/game_server/handlers/main.yml b/roles/services/game_server/handlers/main.yml new file mode 100644 index 0000000..8e221e1 --- /dev/null +++ b/roles/services/game_server/handlers/main.yml | |||
@@ -0,0 +1,71 @@ | |||
1 | - name: create sunshine build dir | ||
2 | become: yes | ||
3 | become_user: "{{ games_user }}" | ||
4 | file: | ||
5 | path: "/home/{{ games_user }}/sunshine/build" | ||
6 | state: directory | ||
7 | owner: "{{ games_user }}" | ||
8 | group: "{{ games_user }}" | ||
9 | mode: "0755" | ||
10 | |||
11 | - name: run npm install | ||
12 | become: yes | ||
13 | become_user: "{{ games_user }}" | ||
14 | command: | ||
15 | cmd: "npm install" | ||
16 | chdir: "/home/{{ games_user }}/sunshine/build" | ||
17 | |||
18 | - name: build sunshine - cmake | ||
19 | become: yes | ||
20 | become_user: "{{ games_user }}" | ||
21 | command: | ||
22 | cmd: "cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 .." | ||
23 | chdir: "/home/{{ games_user }}/sunshine/build" | ||
24 | |||
25 | - name: build sunshine - make | ||
26 | become: yes | ||
27 | become_user: "{{ games_user }}" | ||
28 | command: | ||
29 | cmd: "make" | ||
30 | chdir: "/home/{{ games_user }}/sunshine/build" | ||
31 | |||
32 | - name: build sunshine deb package | ||
33 | become: yes | ||
34 | become_user: "{{ games_user }}" | ||
35 | command: | ||
36 | cmd: "cpack -G DEB" | ||
37 | chdir: "/home/{{ games_user }}/sunshine/build" | ||
38 | |||
39 | - name: install sunshine from deb | ||
40 | apt: | ||
41 | deb: "/home/{{ games_user }}/sunshine/build/cpack_artifacts/Sunshine.deb" | ||
42 | |||
43 | - name: restart sunshine | ||
44 | become: yes | ||
45 | become_user: "{{ games_user }}" | ||
46 | systemd: | ||
47 | scope: user | ||
48 | name: sunshine | ||
49 | state: restarted | ||
50 | |||
51 | - name: decompress and extract firmware | ||
52 | unarchive: | ||
53 | src: "/tmp/linux-firmware-20221109.tar.gz" | ||
54 | dest: "/tmp/" | ||
55 | remote_src: yes | ||
56 | |||
57 | - name: copy all files from amdgpu to /lib/firmware/amdgpu/ | ||
58 | copy: | ||
59 | src: /tmp/linux-firmware-20221109/amdgpu | ||
60 | dest: /lib/firmware | ||
61 | remote_src: yes | ||
62 | owner: root | ||
63 | group: root | ||
64 | mode: "0644" | ||
65 | |||
66 | - name: update initramfs | ||
67 | command: | ||
68 | cmd: "update-initramfs -u" | ||
69 | |||
70 | - name: reboot system | ||
71 | reboot: | ||