summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-19 01:42:19 -0400
committerJoey Hess2014-04-19 01:42:19 -0400
commitf10c4d4aff6810a502cfc770013046e42efc33ef (patch)
treeb3ecd60d32166aca84dc0d72bbebff359778fa3e /Propellor/Property
parent9e578aca6b0914443c95f8691fd3ba39522f28fc (diff)
make primary dns server beat secondary if both are defined for a domain
Made my config file simpler..
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Dns.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Propellor/Property/Dns.hs b/Propellor/Property/Dns.hs
index e47d6c32..4c93799f 100644
--- a/Propellor/Property/Dns.hs
+++ b/Propellor/Property/Dns.hs
@@ -70,6 +70,9 @@ primary hosts domain soa rs = withwarnings (check needupdate baseprop)
in z /= oldzone || oldserial < sSerial (zSOA zone)
-- | Secondary dns server for a domain.
+--
+-- Note that if a host is declared to be a primary and a secondary dns
+-- server for the same domain, the primary server config always wins.
secondary :: [Host] -> Domain -> HostName -> Property
secondary hosts domain master = pureAttrProperty desc (addNamedConf conf)
`requires` servingZones
@@ -95,7 +98,7 @@ servingZones = property "serving configured dns zones" go
zs <- getNamedConf
ensureProperty $
hasContent namedConfFile $
- concatMap confStanza $ S.toList zs
+ concatMap confStanza $ M.elems zs
confStanza :: NamedConf -> [Line]
confStanza c =