StackHead module for Cloudflare DNS.
Install it via ansible-galaxy
:
ansible-galaxy install getstackhead.stackhead_dns_cloudflare
In order to use Cloudflare with StackHead, set stackhead__dns
it in your inventory file:
# inventory for integration test
---
all:
vars:
stackhead__dns:
- getstackhead.stackhead_dns_cloudflare
hosts:
myserver:
ansible_host: 123.456.789 # ...
stackhead:
applications:
# ...
Make sure to provide the API token for Cloudflare. You can generate an API token in your Cloudflare profile.
Make sure to grant write
permissions to DNS on Zone level.
config:
deployment:
getstackhead.stackhead_dns_cloudflare:
cloudflare_api_token: MY-API-TOKEN
or Ansible inventory:
stackhead__config_deployment:
getstackhead.stackhead_dns_cloudflare:
cloudflare_api_token: MY-API-TOKEN
You'll also have to define the DNS provider to be used for each domain you want to set up in project definition:
domains:
- domain: mydomain.com
dns:
provider: cloudflare