Spin up a Terraria server
This commit is contained in:
parent
8984f71aee
commit
e4805658dc
@ -20,3 +20,19 @@
|
||||
- /data/minecraft/botaniapack2-survival/backups
|
||||
- /data/minecraft/botaniapack2-creative/backups
|
||||
tags: [ backup ]
|
||||
- hosts: vm-terraria-1.home.mgmt.desu.ltd
|
||||
pre_tasks:
|
||||
- name: include tasks for gameservers
|
||||
include_tasks: tasks/game/{{ item }}
|
||||
with_items:
|
||||
- terraria-thorium.yml
|
||||
tags: [ always ]
|
||||
roles:
|
||||
- role: backup
|
||||
vars:
|
||||
backup_s3backup_list_extra:
|
||||
- /data
|
||||
- /etc
|
||||
backup_s3backup_exclude_list_extra:
|
||||
- /data/terraria-thorium/backups
|
||||
tags: [ backup ]
|
||||
|
21
playbooks/tasks/game/terraria-thorium.yml
Normal file
21
playbooks/tasks/game/terraria-thorium.yml
Normal file
@ -0,0 +1,21 @@
|
||||
# vim:ft=ansible:
|
||||
- name: docker deploy terraria thorium
|
||||
docker_container:
|
||||
name: terraria-thorium
|
||||
state: started
|
||||
image: rehashedsalt/tmodloader-docker:v0.11.8.5
|
||||
restart_policy: unless-stopped
|
||||
pull: yes
|
||||
ports:
|
||||
- 7777:7777
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /data/terraria-thorium/data:/terraria
|
||||
- /data/terraria-thorium/config.txt:/terraria/config.txt
|
||||
tags: [ docker, terraria, thorium ]
|
||||
- name: assure terraria backup dir
|
||||
file: path=/data/terraria-thorium/backups state=directory owner=root group=root mode=0755
|
||||
tags: [ docker, terraria, thorium ]
|
||||
- name: assure terraria backup cronjob
|
||||
cron: user=root name=terraria-thorium minute=*/30 job="tar czvf \"/data/terraria-thorium/backups/world-$(date +%Y-%m-%d-%H%M).tgz\" /data/terraria-thorium/data/ModLoader/Worlds"
|
||||
tags: [ docker, terraria, thorium ]
|
Loading…
Reference in New Issue
Block a user