summaryrefslogtreecommitdiff
path: root/src/Propellor/Types
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Types')
-rw-r--r--src/Propellor/Types/CmdLine.hs3
-rw-r--r--src/Propellor/Types/Container.hs19
2 files changed, 20 insertions, 2 deletions
diff --git a/src/Propellor/Types/CmdLine.hs b/src/Propellor/Types/CmdLine.hs
index d712a456..77eaa452 100644
--- a/src/Propellor/Types/CmdLine.hs
+++ b/src/Propellor/Types/CmdLine.hs
@@ -2,6 +2,7 @@ module Propellor.Types.CmdLine where
import Propellor.Types.OS
import Propellor.Types.PrivData
+import Propellor.Types.Container
import System.Posix.Types
@@ -25,7 +26,7 @@ data CmdLine
| Relay HostName
| DockerInit HostName
| DockerChain HostName String
- | ChrootChain HostName FilePath Bool Bool
+ | ChrootChain HostName FilePath Bool Bool [ContainerCapability]
| GitPush Fd Fd
| Check
| Build
diff --git a/src/Propellor/Types/Container.hs b/src/Propellor/Types/Container.hs
index 217d7df7..de74f79e 100644
--- a/src/Propellor/Types/Container.hs
+++ b/src/Propellor/Types/Container.hs
@@ -1,7 +1,9 @@
-{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
module Propellor.Types.Container where
+import Propellor.Types.Info
+
-- | A value that can be bound between the host and a container.
--
-- For example, a Bound Port is a Port on the container that is bound to
@@ -28,3 +30,18 @@ data Bound v = Bound
same :: v -> Bound v
same v = Bound v v
+-- | Capabilities of a container.
+data ContainerCapability
+ = HostnameContained
+ -- ^ The container has its own hostname (and domain name)
+ -- separate from the system that contains it.
+ | FilesystemContained
+ -- ^ The container has its own root filesystem, rather than sharing
+ -- the root filesystem of the system that contains it.
+ deriving (Typeable, Eq, Read, Show)
+
+-- | A [ContainerCapability] can be used as Info.
+-- It does not propagate out to the Host.
+-- When not in a container, the Info value will be [].
+instance IsInfo [ContainerCapability] where
+ propagateInfo _ = PropagateInfo False