Add tModLoader template
This commit is contained in:
parent
c2623c70ee
commit
9962c09fb5
55
playbooks/tasks/game/tmodloader-generic.yml
Normal file
55
playbooks/tasks/game/tmodloader-generic.yml
Normal file
@ -0,0 +1,55 @@
|
||||
# vim:ft=ansible:
|
||||
#
|
||||
# Docs available here:
|
||||
# https://github.com/JACOBSMILE/tmodloader1.4
|
||||
#
|
||||
# If you need to run a command in this container:
|
||||
# docker exec tmodloader inject "say Hello World!"
|
||||
#
|
||||
- name: set backups tmodloader - generic
|
||||
vars:
|
||||
backup_dirs:
|
||||
- "/data/tmodloader/generic/data/tModLoader/Worlds"
|
||||
ansible.builtin.cron:
|
||||
user: root
|
||||
name: terraria-generic-backup
|
||||
state: present
|
||||
minute: "*/15"
|
||||
job: "tar czvf \"/data/tmodloader/generic/backups/world-$(date +%Y-%m-%d-%H%M).tgz\" {{ backup_dirs | join(' ') }}"
|
||||
tags: [ docker, tmodloader, generic, cron, backup, tar ]
|
||||
- name: assure backups dir tmodloader - generic
|
||||
ansible.builtin.file:
|
||||
path: /data/tmodloader/generic/backups
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0700"
|
||||
tags: [ docker, tmodloader, generic, file, directory, backup ]
|
||||
- name: docker deploy tmodloader - generic
|
||||
vars:
|
||||
tmodloader_workshop_ids_generic:
|
||||
- ""
|
||||
community.general.docker_container:
|
||||
name: tmodloader-generic
|
||||
state: started
|
||||
image: jacobsmile/tmodloader1.4:latest
|
||||
env:
|
||||
TMOD_AUTODOWNLOAD: "{{ tmodloader_workshop_ids_generic | join(',') }}"
|
||||
TMOD_ENABLEDMODS: "{{ tmodloader_workshop_ids_generic | join(',') }}"
|
||||
TMOD_SHUTDOWN_MESSAGE: "Server is going down NOW!"
|
||||
TMOD_MOTD: "Da bois doin da Terraria again lesgo"
|
||||
TMOD_PASS: "dicks"
|
||||
TMOD_WORLDNAME: "Seaborgium"
|
||||
#TMOD_WORLDSEED: "foobar"
|
||||
# 0 Normal
|
||||
# 1 Expert
|
||||
# 2 Master
|
||||
# 3 Journey
|
||||
TMOD_DIFFICULTY: "1"
|
||||
TMOD_PORT: "7777"
|
||||
ports:
|
||||
- "7777:7777/tcp"
|
||||
- "7777:7777/udp"
|
||||
volumes:
|
||||
- /data/tmodloader/generic/data:/data
|
||||
tags: [ docker, tmodloader, generic ]
|
Loading…
x
Reference in New Issue
Block a user