Added pleroma backup cleanup and mediaproxy.
---
- name: add papermc user
become: yes
user: name="{{papermc_user}}" home="{{papermc_dir}}"
- name: install jre
become: yes
apt: name="default-jre-headless"
- name: download papermc
become: yes
get_url:
url: "{{papermc_url}}"
dest: "{{papermc_dir}}/server.jar"
mode: "0755"
notify: restart papermc
- name: configure eula and ops
become: yes
copy:
src: "{{item}}"
dest: "{{papermc_dir}}/{{item}}"
owner: "{{papermc_user}}"
group: "{{papermc_user}}"
loop:
- "eula.txt"
- "ops.json"
notify: restart papermc
- name: create server.properties
become: yes
file:
path: "{{papermc_dir}}/server.properties"
state: "touch"
owner: "{{papermc_user}}"
group: "{{papermc_user}}"
- name: configure server.properties
become: yes
lineinfile:
path: "{{papermc_dir}}/server.properties"
regexp: "^{{item.key}}="
line: "{{item.key}}={{item.value}}"
notify: restart papermc
loop:
- {key: "motd", value: "{{papermc_motd}}"}
- {key: "level-seed", value: "{{papermc_seed}}"}
- name: install systemd service
become: yes
template:
src: "papermc.service.j2"
dest: "/lib/systemd/system/papermc.service"
notify: restart papermc
- name: ensure service is started
become: yes
systemd: name="papermc.service" enabled="yes" state="started"