diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-10 21:09:20 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-10 21:13:56 -0400 |
| commit | 50cd59cb3e6d20afe48a50fa9dc0c3a9cf9d9960 (patch) | |
| tree | a40995cebd88f276750a3f998124d4d55aaecdba /Propellor.hs | |
| parent | 981085fe8148c23985e1735f0a0926d2efd62375 (diff) | |
new more expressive config.hs WIP
Diffstat (limited to 'Propellor.hs')
| -rw-r--r-- | Propellor.hs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Propellor.hs b/Propellor.hs index 1f1d7eca..e6312248 100644 --- a/Propellor.hs +++ b/Propellor.hs @@ -2,8 +2,9 @@ -- | 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. +-- When propellor runs on a Host, it ensures that its list of Properties +-- is satisfied, taking action as necessary when a Property is not +-- currently satisfied. -- -- A simple propellor program example: -- @@ -13,15 +14,16 @@ -- > import qualified Propellor.Property.Apt as Apt -- > -- > main :: IO () --- > main = defaultMain getProperties +-- > main = defaultMain hosts -- > --- > 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 +-- > hosts :: [Host] +-- > hosts = +-- > [ host "example.com" +-- > & Apt.installed ["mydaemon"] +-- > & "/etc/mydaemon.conf" `File.containsLine` "secure=1" +-- > `onChange` cmdProperty "service" ["mydaemon", "restart"] +-- > ! Apt.installed ["unwantedpackage"] +-- > ] -- -- See config.hs for a more complete example, and clone Propellor's -- git repository for a deployable system using Propellor: @@ -31,6 +33,7 @@ module Propellor ( module Propellor.Types , module Propellor.Property , module Propellor.Property.Cmd + , module Propellor.Attr , module Propellor.PrivData , module Propellor.Engine , module Propellor.Exception @@ -47,6 +50,7 @@ import Propellor.Property.Cmd import Propellor.PrivData import Propellor.Message import Propellor.Exception +import Propellor.Attr import Utility.PartialPrelude as X import Utility.Process as X |
