Refactor "dns" to remove target-domain split

This commit is contained in:
Tobias Reisinger 2024-10-19 00:19:23 +02:00
parent 82c25edf8e
commit 810bf9acb5
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
8 changed files with 33 additions and 72 deletions

View file

@ -63,11 +63,7 @@ def parse_services(services, hosts):
domains = []
for dns in data.get("dns") or []:
domain = ""
if dns.get("target") != "@":
domain += f"{dns["target"]}."
domain += dns['domain']
domains.append(f"- {domain}")
domains.append(f"- {dns['domain']}")
data['key'] = svc_key
data['label'] = "\\n".join([svc] + domains)