From 95b73daa36b23565a8566f71f9b202d3459b685f Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 25 Jun 2023 09:52:36 -0400 Subject: Initial Commit --- roles/services/game_server/handlers/main.yml | 71 ++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 roles/services/game_server/handlers/main.yml (limited to 'roles/services/game_server/handlers') 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 @@ +- name: create sunshine build dir + become: yes + become_user: "{{ games_user }}" + file: + path: "/home/{{ games_user }}/sunshine/build" + state: directory + owner: "{{ games_user }}" + group: "{{ games_user }}" + mode: "0755" + +- name: run npm install + become: yes + become_user: "{{ games_user }}" + command: + cmd: "npm install" + chdir: "/home/{{ games_user }}/sunshine/build" + +- name: build sunshine - cmake + become: yes + become_user: "{{ games_user }}" + command: + cmd: "cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 .." + chdir: "/home/{{ games_user }}/sunshine/build" + +- name: build sunshine - make + become: yes + become_user: "{{ games_user }}" + command: + cmd: "make" + chdir: "/home/{{ games_user }}/sunshine/build" + +- name: build sunshine deb package + become: yes + become_user: "{{ games_user }}" + command: + cmd: "cpack -G DEB" + chdir: "/home/{{ games_user }}/sunshine/build" + +- name: install sunshine from deb + apt: + deb: "/home/{{ games_user }}/sunshine/build/cpack_artifacts/Sunshine.deb" + +- name: restart sunshine + become: yes + become_user: "{{ games_user }}" + systemd: + scope: user + name: sunshine + state: restarted + +- name: decompress and extract firmware + unarchive: + src: "/tmp/linux-firmware-20221109.tar.gz" + dest: "/tmp/" + remote_src: yes + +- name: copy all files from amdgpu to /lib/firmware/amdgpu/ + copy: + src: /tmp/linux-firmware-20221109/amdgpu + dest: /lib/firmware + remote_src: yes + owner: root + group: root + mode: "0644" + +- name: update initramfs + command: + cmd: "update-initramfs -u" + +- name: reboot system + reboot: -- cgit v1.2.3