50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
- name: Fetch TShock server
|
|
get_url:
|
|
url: "https://github.com/Pryaxis/TShock/releases/download/v4.4.0-pre12/TShock4.4.0_Pre12_Terraria1.4.0.5.zip"
|
|
dest: "/tmp/tshock.zip"
|
|
tags:
|
|
- terraria
|
|
- fetch
|
|
notify: Run service actions
|
|
- name: Extract TShock server
|
|
command:
|
|
chdir: "/opt/terraria"
|
|
warn: false
|
|
argv:
|
|
- "unzip"
|
|
- "/tmp/tshock.zip"
|
|
tags:
|
|
- terraria
|
|
- fetch
|
|
- name: Change ownership of server
|
|
command:
|
|
argv:
|
|
- "chown"
|
|
- "-R"
|
|
- "nobody:nogroup"
|
|
- "/opt/terraria"
|
|
tags:
|
|
- terraria
|
|
- fetch
|
|
- name: Copy configurations
|
|
loop: "{{ terraria.configs }}"
|
|
template:
|
|
src: "{{ item }}"
|
|
dest: "{{ terraria.paths.data }}/tshock/{{ item }}"
|
|
mode: "600"
|
|
owner: "nobody"
|
|
group: "nogroup"
|
|
tags:
|
|
- terraria
|
|
- configs
|
|
notify: Run service actions
|
|
when: ( terraria.configs|default([]) ) | length
|
|
- name: Copy service
|
|
template:
|
|
src: "tshock.service.j2"
|
|
dest: "/etc/systemd/system/tshock.service"
|
|
tags:
|
|
- terraria
|
|
- systemd
|
|
notify: Run service actions
|