ansible/roles/dns/tasks/main.yml
Salt ab36f2376e Become root when attempting to push changes to DNS
Kinda forgot the aws keys were in root's home folder whups
2020-06-29 11:24:27 -05:00

19 lines
382 B
YAML

#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Add machine to DNS zone
block:
- name: Get public IP
ipify_facts:
- name: Register record in zone
route53:
state: present
zone: 9iron.club
type: A
record: "{{ inventory_hostname }}.9iron.club."
ttl: 300
value:
- "{{ ipify_public_ip }}"
wait: yes
become: yes