From f10c4d4aff6810a502cfc770013046e42efc33ef Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 19 Apr 2014 01:42:19 -0400 Subject: make primary dns server beat secondary if both are defined for a domain Made my config file simpler.. --- Propellor/Property/Dns.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Propellor/Property/Dns.hs') 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 = -- cgit v1.2.3