summaryrefslogtreecommitdiff
path: root/Propellor/Attr.hs
diff options
context:
space:
mode:
authorJoey Hess2014-04-19 01:26:38 -0400
committerJoey Hess2014-04-19 01:26:38 -0400
commitd1db64b3bc4ef1c802344f666eb160d9a8c97cca (patch)
treeaf3abdb2c4f026c39e5f7c64c62e7cdeb5e34e0e /Propellor/Attr.hs
parent7e9853520b5b7233ce9a9c8153f6c366cab0ee39 (diff)
Propellor can configure primary DNS servers, including generating zone files, which is done by looking at the properties of hosts in a domain.
Diffstat (limited to 'Propellor/Attr.hs')
-rw-r--r--Propellor/Attr.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Propellor/Attr.hs b/Propellor/Attr.hs
index 8c4a2add..a54d8833 100644
--- a/Propellor/Attr.hs
+++ b/Propellor/Attr.hs
@@ -49,6 +49,12 @@ aka domain = pureAttrProperty ("aka " ++ domain)
addDNS :: Record -> SetAttr
addDNS record d = d { _dns = S.insert record (_dns d) }
+addNamedConf :: NamedConf -> SetAttr
+addNamedConf conf d = d { _namedconf = S.insert conf (_namedconf d) }
+
+getNamedConf :: Propellor (S.Set NamedConf)
+getNamedConf = asks _namedconf
+
sshPubKey :: String -> Property
sshPubKey k = pureAttrProperty ("ssh pubkey known") $
\d -> d { _sshPubKey = Just k }