Move DNS to its own playbook

This commit is contained in:
Salt 2020-08-01 16:25:56 -05:00
parent df70073b37
commit 894d6c8504
2 changed files with 21 additions and 2 deletions

16
playbooks/dns.yml Normal file
View File

@ -0,0 +1,16 @@
#!/usr/bin/ansible-playbook
# vim:ft=ansible:
- hosts: 9iron.club
tasks:
- name: Add machine to DNS zone
route53:
state: present
overwrite: yes
zone: 9iron.club
type: A
record: "{{ inventory_hostname }}."
ttl: 300
value: [ "{{ ipify_public_ip }}" ]
wait: yes
tags: [ common, dns ]

View File

@ -3,6 +3,10 @@
---
- import_playbook: provision.yml
- hosts: all
pre_tasks:
- name: Get public IP
ipify_facts:
tags: [ always ]
roles:
- role: influxdb
tags: [ common, influxdb ]
@ -23,10 +27,9 @@
tags: [ common, user ]
- hosts: 9iron.club,cowfee.moe
roles:
- role: dns
tags: [ common, dns ]
- role: snmpd
tags: [ common, snmpd ]
- import_playbook: playbooks/dns.yml
- import_playbook: playbooks/webservers.yml
- import_playbook: playbooks/gameservers.yml
- import_playbook: playbooks/home.yml