Have Minecraft servers publish their own DNS records
AUTOMATE EVERYTHING
This commit is contained in:
parent
ab36f2376e
commit
df047fb174
@ -2,6 +2,7 @@
|
||||
# vim:ft=ansible:
|
||||
ansible_pull_repo: "https://git.9iron.club/salt/ansible"
|
||||
user_username: salt
|
||||
zone: 9iron.club
|
||||
zerotier_network_id: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
35646131343239623265663562343333383362366633386462646465643163353866643633636135
|
||||
|
@ -8,9 +8,9 @@
|
||||
- name: Register record in zone
|
||||
route53:
|
||||
state: present
|
||||
zone: 9iron.club
|
||||
zone: "{{ zone }}"
|
||||
type: A
|
||||
record: "{{ inventory_hostname }}.9iron.club."
|
||||
record: "{{ inventory_hostname }}.{{ zone }}."
|
||||
ttl: 300
|
||||
value:
|
||||
- "{{ ipify_public_ip }}"
|
||||
|
@ -177,4 +177,22 @@
|
||||
src: "backup.sh"
|
||||
dest: "/opt/backups/modules/minecraft-{{ mcname }}.sh"
|
||||
mode: "0600"
|
||||
- name: Assure CNAME record
|
||||
route53:
|
||||
state: present
|
||||
zone: "{{ zone }}"
|
||||
type: CNAME
|
||||
record: "{{ mcname }}.mc.{{ zone }}."
|
||||
ttl: 300
|
||||
value:
|
||||
- "{{ inventory_hostname }}.{{ zone }}."
|
||||
- name: Assure SRV record
|
||||
route53:
|
||||
state: present
|
||||
zone: "{{ zone }}"
|
||||
type: SRV
|
||||
record: "_minecraft._tcp.{{ mcname }}.mc.{{ zone }}."
|
||||
ttl: 300
|
||||
value:
|
||||
- "1 10 {{ mcport }} {{ inventory_hostname }}.{{ zone }}."
|
||||
become: yes
|
||||
|
Loading…
Reference in New Issue
Block a user