Move Minecraft DNS out of role

This commit is contained in:
Salt 2020-08-01 16:29:01 -05:00
parent 837da68679
commit d358e3b64f
2 changed files with 19 additions and 20 deletions

View File

@ -30,6 +30,25 @@
source_args: "+gamemode terrortown +map ttt_lttp_kakariko_a4 +host_workshop_collection 2155532035"
source_configrepo: "https://git.9iron.club/salt/gmodconfig"
tags: [ steam, gmod ]
tasks:
- name: Assure Minecraft CNAME record
route53:
state: present
overwrite: yes
zone: 9iron.club
type: CNAME
record: "{{ mcname }}.mc.9iron.club."
ttl: 300
value: [ "{{ inventory_hostname }}." ]
- name: Assure Minecraft SRV record
route53:
state: present
overwrite: yes
zoen: 9iron.club
type: SRV
record: "_minecraft._tcp.{{ mcname }}.mc.{{ zone }}."
ttl: 300
value: [ "1 10 {{ mcport }} {{ inventory_hostname }}."
#- hosts: game2
# roles:
# - role: backups

View File

@ -178,24 +178,4 @@
src: "backup.sh"
dest: "/opt/backups/modules/minecraft-{{ mcname }}.sh"
mode: "0600"
- name: Assure CNAME record
route53:
state: present
overwrite: yes
zone: "{{ zone }}"
type: CNAME
record: "{{ mcname }}.mc.{{ zone }}."
ttl: 300
value:
- "{{ inventory_hostname_short }}.{{ zone }}."
- name: Assure SRV record
route53:
state: present
overwrite: yes
zone: "{{ zone }}"
type: SRV
record: "_minecraft._tcp.{{ mcname }}.mc.{{ zone }}."
ttl: 300
value:
- "1 10 {{ mcport }} {{ inventory_hostname_short }}.{{ zone }}."
become: yes