ansible/playbooks/tasks/game/terraria-fargo.yml

21 lines
793 B
YAML

# vim:ft=ansible:
- name: docker deploy terraria fargo
docker_container:
name: terraria-fargo
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-fargo/data:/terraria
tags: [ docker, terraria, fargo ]
- name: assure terraria backup dir
file: path=/data/terraria-fargo/backups state=directory owner=root group=root mode=0755
tags: [ docker, terraria, fargo ]
- name: assure terraria backup cronjob
cron: user=root name=terraria-fargo minute=*/30 job="tar czvf \"/data/terraria-fargo/backups/world-$(date +%Y-%m-%d-%H%M).tgz\" /data/terraria-fargo/data/ModLoader/Worlds"
tags: [ docker, terraria, fargo ]