Commit 2776348a authored by Adrien Dorsaz's avatar Adrien Dorsaz
Browse files

fix dns record management when dns host is an IP

Previously we set the string with IP as the list of nameservers.
So, for example, if IP were '172.16.1.1', the list of servers were
['1', '7', '2', '.', '1', '.', '1'] which was clearly falsy.

Now, it's correctly set as ['172.16.1.1'].
parent afb7e988
......@@ -121,7 +121,7 @@ def get_crt(config, log=LOGGER):
nameserver = []
try:
ipaddress.ip_address(config["DNS"]["Host"])
nameserver += config["DNS"]["Host"]
nameserver.append(config["DNS"]["Host"])
except ValueError:
log.debug(" - Configured DNS Host value is not a valid IP address, "
"try to resolve IP address by requesting system DNS servers.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment