From 682fb98785123553aa295bb947cfa82db0ceb099 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 19 Jun 2020 23:27:10 +0200 Subject: [PATCH] Fix server icon and add a private /tmp, allow rw tmpfs --- {templates => files}/mcdir/server-icon.png | Bin tasks/main.yml | 11 +++++++++++ templates/paper-server.service.j2 | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) rename {templates => files}/mcdir/server-icon.png (100%) diff --git a/templates/mcdir/server-icon.png b/files/mcdir/server-icon.png similarity index 100% rename from templates/mcdir/server-icon.png rename to files/mcdir/server-icon.png diff --git a/tasks/main.yml b/tasks/main.yml index 08af8c7..e305e4a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -31,6 +31,17 @@ tags: - minecraft when: ( minecraft.local_plugins|default([]) ) | length +- name: Copy binary files + loop: "{{ minecraft.files }}" + copy: + src: "{{ role_path }}/files/mcdir/{{ item }}" + dest: "{{ minecraft.paths.data }}/{{ item }}" + mode: "700" + owner: "nobody" + group: "nogroup" + tags: + - minecraft + when: ( minecraft.files|default([]) ) | length - name: Fetch plugins loop: "{{ minecraft.plugins }}" get_url: diff --git a/templates/paper-server.service.j2 b/templates/paper-server.service.j2 index daf719b..24434d1 100644 --- a/templates/paper-server.service.j2 +++ b/templates/paper-server.service.j2 @@ -10,7 +10,8 @@ Group=nogroup WorkingDirectory={{ minecraft.paths.data }} ProtectSystem=strict BindPaths=-{{ minecraft.paths.data }} -TemporaryFileSystem=/:ro +TemporaryFileSystem=/:rw +PrivateTmp=true [Install] WantedBy=multi-user.target