Sample Ansible role to create CloudFlare DNS records
Find a file
2021-12-18 21:57:36 -06:00
roles/create-records include credentials only once 2021-12-18 21:44:35 -06:00
.gitignore init 2020-08-22 01:45:15 -05:00
ansible.cfg disable localhost warning, that's our intention 2021-12-18 21:57:36 -06:00
domains add symlink to role vars for domains 2021-12-18 21:31:44 -06:00
play.yml fix name for create-records include_role 2021-12-18 21:47:30 -06:00
README.md formatting 2021-12-18 21:52:33 -06:00

cfdns

Sample Ansible role to create CloudFlare DNS records

Requirements

  1. See roles/create-records/vars/sample.yml for sample DNS zone entry definitions -- change these as desired

To add a domain, define it in the domains list in play.yml.

This will load the correlating file at roles/create-records/vars/{{domain}}.yml.

The symbolic link ./domains was provided to make these files more accessible, not used for function -- can be removed.

TODO: Load files created here dynamically

  1. Your CloudFlare email address and API key must be stored in ~/.cloudflare.yml like so for authentication:
---
cf_email: you@domain.com
cf_token: abcdef123456

If this is a shared system, chmod -v 0600 ~/.cloudflare.yml once created to avoid potentially leaking credentials.