Skip to content

Instantly share code, notes, and snippets.

@zot42
Created March 7, 2018 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zot42/0fc89c07e345eea67cd900f9d861ca25 to your computer and use it in GitHub Desktop.
Save zot42/0fc89c07e345eea67cd900f9d861ca25 to your computer and use it in GitHub Desktop.
Update Route53 from Ansible EC2 inventory
---
- hosts: 127.0.0.1
tasks:
- name: setup dev records
route53:
state: present
private_zone: true
zone: private_zone_name.com
vpc_id: private_zone_vpc_id
record: "{{ item }}.private_zone_name.com"
type: A
ttl: 3600
value: "{{ hostvars[item].ec2_private_ip_address }}"
overwrite: true
with_items:
- "{{ groups['ec2'] }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment