ansible/playbooks/gameservers.yml
2020-09-17 08:23:08 -05:00

79 lines
2.0 KiB
YAML

#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- hosts: gameservers
roles:
- role: base-backups
tags: [ backups ]
- hosts: tes3mp1.9iron.club
roles:
- role: tes3mp
tags: [ tes3mp ]
tasks:
- name: Assure CNAME record
route53:
state: present
overwrite: yes
zone: 9iron.club
type: CNAME
record: tes3mp.9iron.club
ttl: 3600
value: [ "{{ inventory_hostname }}." ]
become: yes
tags: [ dns ]
- hosts: mc1.9iron.club
roles:
- role: base-backups
tags: [ backups ]
# - role: minecraft
# vars:
# mcname: "me5"
# mczip: "https://www.9iron.club/files/me5.zip"
# mcforge: "1.12.2-14.23.5.2854"
# mcmotd: "ME5 is Fun Edition"
# mcport: 25565
# mcgamemode: 0
# mcviewdist: 14
# mcleveltype: "default"
# tags: [ gameserver, minecraft, me5 ]
- role: tmodloader
vars:
terraria_difficulty: 1
terraria_name: "calamity"
terraria_password: "dicks"
tags: [ gameserver, terraria, calamity ]
tasks:
- name: Assure Minecraft CNAME record
route53:
state: present
overwrite: yes
zone: 9iron.club
type: CNAME
record: "me5.mc.9iron.club."
ttl: 3600
value: [ "{{ inventory_hostname }}." ]
become: yes
tags: [ dns, minecraft, me5 ]
- name: Assure Minecraft SRV record
route53:
state: present
overwrite: yes
zone: 9iron.club
type: SRV
record: "_minecraft._tcp.me5.mc.9iron.club."
ttl: 3600
value: [ "1 10 25565 {{ inventory_hostname }}." ]
become: yes
tags: [ dns, minecraft, me5 ]
- name: Assure Terraria record
route53:
state: present
overwrite: yes
zone: 9iron.club
type: CNAME
record: "calamity.9iron.club"
ttl: 3600
value: [ "{{ inventory_hostname }}." ]
become: yes
tags: [ dns, terraria, calamity ]