ansible/playbooks/tasks/game/terraria-thorium.yml
2022-01-12 15:14:30 -06:00

22 lines
876 B
YAML

# 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 ]