From 4e65793674752cec8d4d2204bd090c8a34701a19 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Apr 2014 16:21:38 -0400 Subject: [PATCH] propellor spin --- Propellor/Property/Dns.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Propellor/Property/Dns.hs b/Propellor/Property/Dns.hs index 45a6949..5c3162c 100644 --- a/Propellor/Property/Dns.hs +++ b/Propellor/Property/Dns.hs @@ -50,8 +50,7 @@ import Data.List -- 2. By looking for NS Records in the passed list of records. -- -- In either case, the secondary dns server Host should have an ipv4 and/or --- ipv6 property defined. Propellor will warn if it cannot find the IP --- address for any secondary. +-- ipv6 property defined. primary :: [Host] -> Domain -> SOA -> [(BindDomain, Record)] -> RevertableProperty primary hosts domain soa rs = RevertableProperty setup cleanup where @@ -79,13 +78,14 @@ primary hosts domain soa rs = RevertableProperty setup cleanup , confFile = zonefile , confMasters = [] , confAllowTransfer = nub $ - concatMap (\h -> hostAddresses h hosts) secondaries + concatMap (\h -> hostAddresses h hosts) $ + secondaries ++ nssecondaries , confLines = [] } - secondaries = otherServers Secondary hosts domain ++ - mapMaybe (domainHostName <=< getNS) rootRecords + secondaries = otherServers Secondary hosts domain secondarywarnings = map (\h -> "No IP address defined for DNS seconary " ++ h) $ filter (\h -> null (hostAddresses h hosts)) secondaries + nssecondaries = mapMaybe (domainHostName <=< getNS) rootRecords rootRecords = map snd $ filter (\(d, _r) -> d == RootDomain || d == AbsDomain domain) rs needupdate = do