mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-10 06:24:17 +00:00
chore(dns): allow pointing CNAMES to FQDNs
This commit is contained in:
parent
e8db39ad82
commit
e44e0ee329
2 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ CNAME entries can be specified in a list of dicts in `dns_cnames`, and each entr
|
|||
with the keys `zone` and `names`.
|
||||
`zone` is the zone where the CNAMEs should be created, and `names` is an array of dicts describing each CNAME.
|
||||
This dict has a mandatory entry called `name`, which is the CNAME itself.
|
||||
It is supported to also have a key called `target`, which can be used to point the CNAME to `target`.`zone`,
|
||||
It is supported to also have a key called `target`, which can be used to point the CNAME to `target` directly,
|
||||
the default is `dns_host_name_short`.`zone`.
|
||||
|
||||
### SRV records
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
type: CNAME
|
||||
zone: "{{ item.0.zone }}"
|
||||
record: "{{ item.1.name }}"
|
||||
value: "{{ item.1.target|default(dns_host_name_short) }}.{{ item.0.zone }}"
|
||||
value: "{{ item.1.target|default([dns_host_name_short, item.0.zone]|join('.')) }}"
|
||||
api_token: "{{ dns_cloudflare_api_key }}"
|
||||
loop: "{{ dns_cnames | subelements('names') }}"
|
||||
when: dns_management_method == "cloudflare"
|
||||
|
|
Loading…
Reference in a new issue