summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Dns.hs
diff options
context:
space:
mode:
authorJoey Hess2015-01-04 13:42:01 -0400
committerJoey Hess2015-01-04 13:42:01 -0400
commitbf34d6f423bd2da76938dfdc1cf4525dc17b97c5 (patch)
treeb69593791ebbc0ec266f236bc4139f0873dda984 /src/Propellor/Property/Dns.hs
parent3d21a2df5433a725b6060d9533da86aacb7a6527 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/Dns.hs')
-rw-r--r--src/Propellor/Property/Dns.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Propellor/Property/Dns.hs b/src/Propellor/Property/Dns.hs
index 47f39718..062b278b 100644
--- a/src/Propellor/Property/Dns.hs
+++ b/src/Propellor/Property/Dns.hs
@@ -56,15 +56,15 @@ import Data.List
primary :: [Host] -> Domain -> SOA -> [(BindDomain, Record)] -> RevertableProperty
primary hosts domain soa rs = RevertableProperty setup cleanup
where
- setup = setupPrimary zonefile hosts domain soa rs
+ setup = setupPrimary zonefile id hosts domain soa rs
`onChange` Service.reloaded "bind9"
cleanup = cleanupPrimary zonefile domain
`onChange` Service.reloaded "bind9"
zonefile = "/etc/bind/propellor/db." ++ domain
-setupPrimary :: FilePath -> [Host] -> Domain -> SOA -> [(BindDomain, Record)] -> Property
-setupPrimary zonefile hosts domain soa rs =
+setupPrimary :: FilePath -> (FilePath -> FilePath) -> [Host] -> Domain -> SOA -> [(BindDomain, Record)] -> Property
+setupPrimary zonefile mknamedconffile hosts domain soa rs =
withwarnings (check needupdate baseprop)
`requires` servingZones
where
@@ -79,7 +79,7 @@ setupPrimary zonefile hosts domain soa rs =
conf = NamedConf
{ confDomain = domain
, confDnsServerType = Master
- , confFile = zonefile
+ , confFile = mknamedconffile zonefile
, confMasters = []
, confAllowTransfer = nub $
concatMap (\h -> hostAddresses h hosts) $
@@ -132,7 +132,7 @@ signedPrimary recurrance hosts domain soa rs = RevertableProperty setup cleanup
where
-- TODO enable dnssec options.
-- dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto;
- setup = setupPrimary zonefile hosts domain soa rs'
+ setup = setupPrimary zonefile signedZoneFile hosts domain soa rs'
`onChange` toProp (zoneSigned domain zonefile)
`onChange` Service.reloaded "bind9"