Created
September 30, 2015 13:08
-
-
Save overdrive3000/dc9626dae9827ef28875 to your computer and use it in GitHub Desktop.
Modify Route53 record using Ansible in a private hosted zone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Debug | |
hosts: localhost | |
tasks: | |
- debug: var=ansible_eth0["ipv4"]["address"] | |
- name: Get DNS record information | |
hosts: localhost | |
tasks: | |
- route53: command=get zone=foo.com record=subdomain.foo.com type=A private_zone=true | |
register: rec | |
- name: Print record | |
debug: var=rec | |
- name: Edit Route53 record | |
hosts: localhost | |
tasks: | |
- route53: command=create zone=foo.com record=subdomain.foo.com type=A ttl=300 value={{ ansible_eth0["ipv4"]["address"] }} overwrite=true private_zone=true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment