Move DNS to its own playbook
This commit is contained in:
parent
df70073b37
commit
894d6c8504
16
playbooks/dns.yml
Normal file
16
playbooks/dns.yml
Normal 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 ]
|
7
site.yml
7
site.yml
@ -3,6 +3,10 @@
|
|||||||
---
|
---
|
||||||
- import_playbook: provision.yml
|
- import_playbook: provision.yml
|
||||||
- hosts: all
|
- hosts: all
|
||||||
|
pre_tasks:
|
||||||
|
- name: Get public IP
|
||||||
|
ipify_facts:
|
||||||
|
tags: [ always ]
|
||||||
roles:
|
roles:
|
||||||
- role: influxdb
|
- role: influxdb
|
||||||
tags: [ common, influxdb ]
|
tags: [ common, influxdb ]
|
||||||
@ -23,10 +27,9 @@
|
|||||||
tags: [ common, user ]
|
tags: [ common, user ]
|
||||||
- hosts: 9iron.club,cowfee.moe
|
- hosts: 9iron.club,cowfee.moe
|
||||||
roles:
|
roles:
|
||||||
- role: dns
|
|
||||||
tags: [ common, dns ]
|
|
||||||
- role: snmpd
|
- role: snmpd
|
||||||
tags: [ common, snmpd ]
|
tags: [ common, snmpd ]
|
||||||
|
- import_playbook: playbooks/dns.yml
|
||||||
- import_playbook: playbooks/webservers.yml
|
- import_playbook: playbooks/webservers.yml
|
||||||
- import_playbook: playbooks/gameservers.yml
|
- import_playbook: playbooks/gameservers.yml
|
||||||
- import_playbook: playbooks/home.yml
|
- import_playbook: playbooks/home.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user