Move Gmod DNS out of role

This commit is contained in:
Salt 2020-08-01 16:30:39 -05:00
parent 3abe7eb78c
commit 98b210413b
2 changed files with 10 additions and 11 deletions

View File

@ -31,6 +31,15 @@
source_configrepo: "https://git.9iron.club/salt/gmodconfig" source_configrepo: "https://git.9iron.club/salt/gmodconfig"
tags: [ steam, gmod ] tags: [ steam, gmod ]
tasks: tasks:
- name: Assure Gmod CNAME record
route53:
state: present
overwrite: yes
zone: 9iron.club
type: CNAME
record: "{{ source_instancename }}.src.9iron.club."
ttl: 300
value: [ "{{ inventory_hostname }}." ]
- name: Assure Minecraft CNAME record - name: Assure Minecraft CNAME record
route53: route53:
state: present state: present
@ -48,7 +57,7 @@
type: SRV type: SRV
record: "_minecraft._tcp.{{ mcname }}.mc.{{ zone }}." record: "_minecraft._tcp.{{ mcname }}.mc.{{ zone }}."
ttl: 300 ttl: 300
value: [ "1 10 {{ mcport }} {{ inventory_hostname }}." value: [ "1 10 {{ mcport }} {{ inventory_hostname }}." ]
#- hosts: game2 #- hosts: game2
# roles: # roles:
# - role: backups # - role: backups

View File

@ -36,14 +36,4 @@
name: "source-{{ source_instancename }}" name: "source-{{ source_instancename }}"
state: started state: started
enabled: yes enabled: yes
- name: Assure CNAME record
route53:
state: present
overwrite: yes
zone: "{{ zone }}"
type: CNAME
record: "{{ source_instancename }}.src.{{ zone }}."
ttl: 300
value:
- "{{ inventory_hostname_short }}.{{ zone }}."
become: yes become: yes