114 lines
3.4 KiB
YAML
Executable File
114 lines
3.4 KiB
YAML
Executable File
#!/usr/bin/env ansible-playbook
|
|
# vim:ft=ansible:
|
|
# Game servers
|
|
---
|
|
- hosts: game1.desu.ltd
|
|
vars_files:
|
|
- vars/factorio-main.yml
|
|
tasks:
|
|
- name: install docker libs
|
|
apt: name=python3-docker
|
|
tags: [ docker ]
|
|
roles:
|
|
- role: backup
|
|
vars:
|
|
backup_s3backup_list_extra:
|
|
- /opt/minecraft/dammit
|
|
- /opt/minecraft/valhelsia
|
|
- /opt/minecraft/vanilla
|
|
- /opt/factorio
|
|
backup_s3backup_exclude_list_extra:
|
|
- /opt/minecraft/dammit/backups
|
|
- /opt/minecraft/valhelsia/backups
|
|
- /opt/minecraft/vanilla/backups
|
|
tags: [ backup ]
|
|
- role: docker
|
|
tags: [ docker, skip-pull ]
|
|
- role: motd
|
|
vars:
|
|
motd_watch_services_extra:
|
|
- docker
|
|
- minecraft@dammit
|
|
- minecraft@valhelsia
|
|
- minecraft@vanilla
|
|
tags: [ motd ]
|
|
- role: factorio
|
|
vars:
|
|
server_version: 1.0.0
|
|
download_checksum: sha256:81d9e1aa94435aeec4131c8869fa6e9331726bea1ea31db750b65ba42dbd1464
|
|
service_name: factorio-main
|
|
service_root: /opt/factorio/main
|
|
factorio_server_settings:
|
|
name: "Krabby Land"
|
|
description: "Where a kid can have fun"
|
|
max_players: 8
|
|
visibility:
|
|
public: false
|
|
lan: false
|
|
admins: [ "rehashed_salt" ]
|
|
tags: [ game, factorio ]
|
|
# Docker gameservers
|
|
- hosts: game1.desu.ltd
|
|
vars:
|
|
container_default_behavior: no_defaults
|
|
tasks:
|
|
# https://github.com/mkrupczak3/SCP-SECRET-LAB-DOCKER
|
|
# Kinda forked it and changed a few settings tho
|
|
- name: docker deploy scpsl
|
|
docker_container:
|
|
state: absent
|
|
name: scpsl
|
|
image: rehashedsalt/scpsl:latest
|
|
restart_policy: unless-stopped
|
|
pull: yes
|
|
ports:
|
|
- "7777-7784:7777-7784/udp"
|
|
- "7777-7784:7777-7784"
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /home/steam/steamcmd
|
|
- /home/steam/scp_server
|
|
tags: [ docker, scpsl ]
|
|
- name: docker deploy terraria
|
|
docker_container:
|
|
name: terraria
|
|
image: rehashedsalt/tmodloader
|
|
restart_policy: unless-stopped
|
|
pull: yes
|
|
ports:
|
|
- 7777:7777
|
|
volumes:
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- /data/terraria/data:/terraria
|
|
tags: [ docker, terraria ]
|
|
# Vanilla Ice
|
|
# Note that this one doesn't get a nightly restart job because Paper is awesome
|
|
- hosts: game1.desu.ltd
|
|
vars_files:
|
|
- vars/minecraft-vanilla.yml
|
|
roles:
|
|
- role: minecraft
|
|
tags: [ game, minecraft, paper, vanilla ]
|
|
# Valhelsia
|
|
- hosts: game1.desu.ltd
|
|
tasks:
|
|
- name: restart minecraft@valhelsia nightly
|
|
cron: name=restart-valhelsia hour=5 minute=0 job="systemctl restart minecraft@valhelsia" disabled={{ not minecraft_enabled }}
|
|
tags: [ game, minecraft, forge, valhelsia, cron ]
|
|
vars_files:
|
|
- vars/minecraft-valhelsia.yml
|
|
roles:
|
|
- role: minecraft
|
|
tags: [ game, minecraft, forge, valhelsia ]
|
|
# The Magic Pack
|
|
- hosts: game1.desu.ltd
|
|
tasks:
|
|
- name: restart minecraft@dammit nightly
|
|
cron: name=restart-dammit hour=5 minute=0 job="systemctl restart minecraft@dammit" disabled={{ not minecraft_enabled }}
|
|
tags: [ game, minecraft, forge, dammit, cron ]
|
|
vars_files:
|
|
- vars/minecraft-dammit.yml
|
|
roles:
|
|
- role: minecraft
|
|
tags: [ game, minecraft, forge, dammit ]
|