summaryrefslogtreecommitdiff
path: root/Propellor/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-04-14 02:24:55 -0400
committerJoey Hess <joey@kitenet.net>2014-04-14 02:24:55 -0400
commit18d33cd39100981c5c6e5f3c1c0f88d336287f29 (patch)
tree7863ddbdf7b3255d42b7354c0d8b21184f452241 /Propellor/Types.hs
parent9e9d0f1d410f806b546abed6055b25ac81f7042e (diff)
parent3a45bfa1a2ae855cac0653e92f897c3d151f038d (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'Propellor/Types.hs')
-rw-r--r--Propellor/Types.hs38
1 files changed, 11 insertions, 27 deletions
diff --git a/Propellor/Types.hs b/Propellor/Types.hs
index e6e02126..5f575daf 100644
--- a/Propellor/Types.hs
+++ b/Propellor/Types.hs
@@ -6,8 +6,6 @@ module Propellor.Types
( Host(..)
, Attr
, HostName
- , UserName
- , GroupName
, Propellor(..)
, Property(..)
, RevertableProperty(..)
@@ -19,14 +17,12 @@ module Propellor.Types
, requires
, Desc
, Result(..)
- , System(..)
- , Distribution(..)
- , DebianSuite(..)
- , Release
- , Architecture
, ActionResult(..)
, CmdLine(..)
, PrivDataField(..)
+ , GpgKeyId
+ , SshKeyType(..)
+ , module Propellor.Types.OS
) where
import Data.Monoid
@@ -36,12 +32,10 @@ import "mtl" Control.Monad.Reader
import "MonadCatchIO-transformers" Control.Monad.CatchIO
import Propellor.Types.Attr
+import Propellor.Types.OS
data Host = Host [Property] (Attr -> Attr)
-type UserName = String
-type GroupName = String
-
-- | Propellor's monad provides read-only access to attributes of the
-- system.
newtype Propellor p = Propellor { runWithAttr :: ReaderT Attr IO p }
@@ -117,22 +111,6 @@ instance Monoid Result where
mappend _ MadeChange = MadeChange
mappend NoChange NoChange = NoChange
--- | High level descritption of a operating system.
-data System = System Distribution Architecture
- deriving (Show)
-
-data Distribution
- = Debian DebianSuite
- | Ubuntu Release
- deriving (Show)
-
-data DebianSuite = Experimental | Unstable | Testing | Stable | DebianRelease Release
- deriving (Show, Eq)
-
-type Release = String
-
-type Architecture = String
-
-- | Results of actions, with color.
class ActionResult a where
getActionResult :: a -> (String, ColorIntensity, Color)
@@ -162,9 +140,15 @@ data CmdLine
-- It's fine to add new fields.
data PrivDataField
= DockerAuthentication
- | SshPrivKey UserName
+ | SshPubKey SshKeyType UserName
+ | SshPrivKey SshKeyType UserName
+ | SshAuthorizedKeys UserName
| Password UserName
| PrivFile FilePath
+ | GpgKey GpgKeyId
deriving (Read, Show, Ord, Eq)
+type GpgKeyId = String
+data SshKeyType = SshRsa | SshDsa | SshEcdsa
+ deriving (Read, Show, Ord, Eq)