summaryrefslogtreecommitdiff
path: root/src/Propellor/Container.hs
diff options
context:
space:
mode:
authorJoey Hess2016-03-26 21:38:39 -0400
committerJoey Hess2016-03-26 21:38:39 -0400
commit46fc5467e633a9c1f149cb0cd7ee03af1e9e0aa1 (patch)
tree85d0136a1bc612a998259ab8690d20916d5ba704 /src/Propellor/Container.hs
parent530b0dde35e143df1ba8cb8f4828e0a3bc0b4ffb (diff)
ported docker
Also, implemented modifyHostProps to add properties to an existing host. Using it bypasses some type safety. Its use in docker is safe though. But, in Conductor, the use of it was not really safe, because it was used with a DebianLike property. Fixed that by making Ssh.installed target all unix's, although it will fail on non-DebianLike ones.
Diffstat (limited to 'src/Propellor/Container.hs')
-rw-r--r--src/Propellor/Container.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/Container.hs b/src/Propellor/Container.hs
index 6e974efd..832faf9c 100644
--- a/src/Propellor/Container.hs
+++ b/src/Propellor/Container.hs
@@ -7,11 +7,11 @@ import Propellor.Types.MetaTypes
import Propellor.Types.Info
import Propellor.PrivData
-class Container c where
+class IsContainer c where
containerProperties :: c -> [ChildProperty]
containerInfo :: c -> Info
-instance Container Host where
+instance IsContainer Host where
containerProperties = hostProperties
containerInfo = hostInfo
@@ -28,7 +28,7 @@ propagateContainer
-- Since the children being added probably have info,
-- require the Property's metatypes to have info.
( IncludesInfo metatypes ~ 'True
- , Container c
+ , IsContainer c
)
=> String
-> c