This role manages the installation of route53-dyndns on a Raspberry Pi, although it should be able to manage any other Debian based system.
- A node which will update an A record in AWS's Route53 every hour.
- Ansible 1.6 or higher
- Raspberry Pi (possibly other Debian based systems)
- A JSON file must exist in
/etc/ansible/facts.d
calledaws.fact
. The file should look similar to the following and must contain proper AWS credentials to update an A record in AWS route53.{ "access_key":"AWS_ACCESS_KEY", "secret_key":"AWS_SECRET_KEY" }
- route53_dyndns_record - the A record to update within Route53
- route53_dyndns_git_url - the URL of the repo where route53-dyndns.py can be found. Usually this will not need to change.
- route53_dyndns_destination_path - where on the local file system should the route53-dyndns scripts live. Default: /root/route53-dyndns
To Change the value of variables, create a file in host_vars/
or group_vars/
or define variables in the playbook.
There are other options for changing variable values. See Ansible Variable Documentation for more ideas.
Include this role in your plays and set varaibles as desired.
---
name: route53-dyndns-servers
hosts: route53-dyndns-servers
vars:
route53_dyndns_record: 'myhome.mydomain.com'
roles:
- route53-dyndns
I decided not to use the built-in cron module in an attempt to keep things simple. This role will create a script which sets AWS credentials and runs the route53-dyndns.py script every hour. This should be good enough for most users.
This role includes Travis CI tests.