Parameter |
Choices/Defaults |
Comments |
account_api_token
required |
|
Account API token. You can obtain your API key from the bottom of the Cloudflare 'My Account' page, found here: https://dash.cloudflare.com/
|
account_email
required |
|
Account email.
|
algorithm
int
(added in 2.7) |
|
Algorithm number. Required for type=DS and type=SSHFP when state=present .
|
cert_usage
int
(added in 2.7) |
|
Certificate usage number. Required for type=TLSA when state=present .
|
hash_type
int
(added in 2.7) |
|
Hash type number. Required for type=DS , type=SSHFP and type=TLSA when state=present .
|
key_tag
int
(added in 2.7) |
|
DNSSEC key tag. Needed for type=DS when state=present .
|
port
|
|
Service port. Required for type=SRV and type=TLSA .
|
priority
|
Default:
1
|
Record priority. Required for type=MX and type=SRV
|
proto
|
|
Service protocol. Required for type=SRV and type=TLSA .
Common values are tcp and udp.
Before Ansible 2.6 only tcp and udp were available.
|
proxied
bool
(added in 2.3) |
|
Proxy through cloudflare network or just use DNS
|
record
|
Default:
@
|
Record to add. Required if state=present . Default is @ (e.g. the zone name)
aliases: name
|
selector
int
(added in 2.7) |
|
Selector number. Required for type=TLSA when state=present .
|
service
|
|
Record service. Required for type=SRV
|
solo
|
|
Whether the record should be the only one for that record type and record name. Only use with state=present
This will delete all other records with the same record name and type.
|
state
|
Choices:
present ←
- absent
|
Whether the record(s) should exist or not
|
timeout
|
Default:
30
|
Timeout for Cloudflare API calls
|
ttl
|
Default:
1 (automatic)
|
The TTL to give the new record. Must be between 120 and 2,147,483,647 seconds, or 1 for automatic.
|
type
|
Choices:
- A
- AAAA
- CNAME
- TXT
- SRV
- MX
- NS
- DS
- SPF
- SSHFP
- TLSA
|
The type of DNS record to create. Required if state=present
type=DS , type=SSHFP and type=TLSA added in Ansible 2.7.
|
value
|
|
The record value. Required for state=present
aliases: content
|
weight
|
Default:
1
|
Service weight. Required for type=SRV
|
zone
required |
|
The name of the Zone to work with (e.g. "example.com"). The Zone must already exist.
aliases: domain
|