diff options
| author | Joey Hess <joey@kitenet.net> | 2014-03-31 01:06:44 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-03-31 01:06:44 -0400 |
| commit | 9d348647d9d1b47d0119b3988e0ece9aa383d166 (patch) | |
| tree | 395083db20bd8e8508a730af7d8ca031f6f79ca3 /Propellor.hs | |
| parent | 2383674638d14b18a668fa2fcd2689724b4ae4cc (diff) | |
propellor spin
Diffstat (limited to 'Propellor.hs')
| -rw-r--r-- | Propellor.hs | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/Propellor.hs b/Propellor.hs index 1ab2cbd7..bc26df58 100644 --- a/Propellor.hs +++ b/Propellor.hs @@ -1,26 +1,25 @@ -- | Pulls in lots of useful modules for building and using Properties. --- +-- -- Propellor enures that the system it's run in satisfies a list of -- properties, taking action as necessary when a property is not yet met. -- -- A simple propellor program example: -- --- ---> import Propellor ---> import Propellor.CmdLine ---> import qualified Propellor.Property.File as File ---> import qualified Propellor.Property.Apt as Apt ---> ---> main :: IO () ---> main = defaultMain getProperties ---> ---> getProperties :: HostName -> Maybe [Property] ---> getProperties "example.com" = Just ---> [ Apt.installed ["mydaemon"] ---> , "/etc/mydaemon.conf" `File.containsLine` "secure=1" ---> `onChange` cmdProperty "service" ["mydaemon", "restart"]] ---> ] ---> getProperties _ = Nothing +-- > import Propellor +-- > import Propellor.CmdLine +-- > import qualified Propellor.Property.File as File +-- > import qualified Propellor.Property.Apt as Apt +-- > +-- > main :: IO () +-- > main = defaultMain getProperties +-- > +-- > getProperties :: HostName -> Maybe [Property] +-- > getProperties "example.com" = Just +-- > [ Apt.installed ["mydaemon"] +-- > , "/etc/mydaemon.conf" `File.containsLine` "secure=1" +-- > `onChange` cmdProperty "service" ["mydaemon", "restart"]] +-- > ] +-- > getProperties _ = Nothing -- -- See config.hs for a more complete example, and clone Propellor's -- git repository for a deployable system using Propellor: @@ -31,12 +30,14 @@ module Propellor ( , module Propellor.Property , module Propellor.Property.Cmd , module Propellor.PrivData + , module Propellor.Engine , module X ) where import Propellor.Types import Propellor.Property +import Propellor.Engine import Propellor.Property.Cmd import Propellor.PrivData |
