ansible/playbooks/dns.yml

18 lines
378 B
YAML
Raw Normal View History

2020-08-01 16:25:56 -05:00
#!/usr/bin/ansible-playbook
# vim:ft=ansible:
2020-10-11 19:56:06 -05:00
- hosts: 9iron
2020-08-01 16:25:56 -05:00
tasks:
- name: Add machine to DNS zone
route53:
state: present
overwrite: yes
zone: 9iron.club
type: A
record: "{{ inventory_hostname }}."
ttl: 3600
2020-08-01 16:25:56 -05:00
value: [ "{{ ipify_public_ip }}" ]
wait: yes
2020-08-01 16:36:04 -05:00
become: yes
2020-08-01 16:25:56 -05:00
tags: [ common, dns ]