diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-01-24 13:59:29 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-01-24 16:53:59 -0400 |
| commit | 414ee7eee60300eb7f7c49e4890b056d19b3c59b (patch) | |
| tree | 93f7ca55067b2c2e00c04110e8605c4d67088fea /src/Propellor/Property | |
| parent | 38eec6fc37054df1838be905670e1ed1ff308a65 (diff) | |
added GADT to determine between a property with info and without
Not yet used
Diffstat (limited to 'src/Propellor/Property')
| -rw-r--r-- | src/Propellor/Property/Chroot.hs | 6 | ||||
| -rw-r--r-- | src/Propellor/Property/Dns.hs | 2 | ||||
| -rw-r--r-- | src/Propellor/Property/Docker.hs | 6 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs index e8afb656..0ef6e7dd 100644 --- a/src/Propellor/Property/Chroot.hs +++ b/src/Propellor/Property/Chroot.hs @@ -80,7 +80,11 @@ provisioned' propigator c@(Chroot loc system builderconf _) systemdonly = Revert propigateChrootInfo :: Chroot -> Property -> Property propigateChrootInfo c p = propigateContainer c p' where - p' = p { propertyInfo = propertyInfo p <> chrootInfo c } + p' = mkProperty + (propertyDesc p) + (propertySatisfy p) + (propertyInfo p <> chrootInfo c) + (propertyChildren p) chrootInfo :: Chroot -> Info chrootInfo (Chroot loc _ _ h) = diff --git a/src/Propellor/Property/Dns.hs b/src/Propellor/Property/Dns.hs index 6114834c..d6666618 100644 --- a/src/Propellor/Property/Dns.hs +++ b/src/Propellor/Property/Dns.hs @@ -77,7 +77,7 @@ setupPrimary zonefile mknamedconffile hosts domain soa rs = indomain = M.elems $ M.filterWithKey (\hn _ -> inDomain domain $ AbsDomain $ hn) hostmap (partialzone, zonewarnings) = genZone indomain hostmap domain soa - baseprop = Property ("dns primary for " ++ domain) satisfy + baseprop = mkProperty ("dns primary for " ++ domain) satisfy (addNamedConf conf) [] satisfy = do sshfps <- concat <$> mapM (genSSHFP domain) (M.elems hostmap) diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs index b641c89c..9645bfe7 100644 --- a/src/Propellor/Property/Docker.hs +++ b/src/Propellor/Property/Docker.hs @@ -137,7 +137,11 @@ docked ctr@(Container _ h) = RevertableProperty propigateContainerInfo :: Container -> Property -> Property propigateContainerInfo ctr@(Container _ h) p = propigateContainer ctr p' where - p' = p { propertyInfo = propertyInfo p <> dockerinfo } + p' = mkProperty + (propertyDesc p) + (propertySatisfy p) + (propertyInfo p <> dockerinfo) + (propertyChildren p) dockerinfo = dockerInfo $ mempty { _dockerContainers = M.singleton (hostName h) h } |
