fix aliases

This commit is contained in:
Charlie Jacomme 2018-08-08 11:59:08 +02:00
parent e007719926
commit a56e9c444c

View file

@ -29,7 +29,7 @@ template_txt = "{field1} IN TXT {field2}"
template_srv = "_{service}._{protocol}.{zone} {ttl} IN SRV {priority} {weight} {port} {target}" template_srv = "_{service}._{protocol}.{zone} {ttl} IN SRV {priority} {weight} {port} {target}"
template_a = "{hostname} IN A {ipv4}" template_a = "{hostname} IN A {ipv4}"
template_aaaa = "{hostname} IN AAAA {ipv6}" template_aaaa = "{hostname} IN AAAA {ipv6}"
template_cname = "{hostname} IN CNAME {alias}" template_cname = "{hostname} IN CNAME {alias}."
template_ptr = "{target} IN PTR {hostname}." template_ptr = "{target} IN PTR {hostname}."
template_zone = ("$TTL 2D\n" template_zone = ("$TTL 2D\n"
@ -138,7 +138,7 @@ def write_dns_files(api_client):
cname_records = "\n".join( cname_records = "\n".join(
template_cname.format(hostname=x['hostname'], template_cname.format(hostname=x['hostname'],
alias=x['alias'],extension=x['extension']) alias=x['alias'])
for x in zone['cname_records'] for x in zone['cname_records']
) )