summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-23 16:21:38 -0400
committerJoey Hess2014-04-23 16:21:38 -0400
commit4e65793674752cec8d4d2204bd090c8a34701a19 (patch)
treef024b9b334058ec7ee684f2ae96a535bc33483cd /Propellor/Property
parentb2341697cc2ea3d59a325acecdf999e8ab1e2e59 (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Dns.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Propellor/Property/Dns.hs b/Propellor/Property/Dns.hs
index 45a69499..5c3162cb 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