diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-13 15:34:01 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-13 15:34:01 -0400 |
| commit | 95ac5163da904780ae166c2bf3a0addcb8d8870e (patch) | |
| tree | c476ec0951db984c2784a9e5ba7370bac333e64a /Propellor/Attr.hs | |
| parent | 576acfed33abfae2065354431100701713e83a23 (diff) | |
Properties can now be satisfied differently on different operating systems.
Diffstat (limited to 'Propellor/Attr.hs')
| -rw-r--r-- | Propellor/Attr.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Propellor/Attr.hs b/Propellor/Attr.hs index 67ea8b8c..9a9d8446 100644 --- a/Propellor/Attr.hs +++ b/Propellor/Attr.hs @@ -21,6 +21,13 @@ hostname name = pureAttrProperty ("hostname " ++ name) $ getHostName :: Propellor HostName getHostName = asks _hostname +os :: System -> AttrProperty +os system = pureAttrProperty ("OS " ++ show system) $ + \d -> d { _os = Just system } + +getOS :: Propellor (Maybe System) +getOS = asks _os + cname :: Domain -> AttrProperty cname domain = pureAttrProperty ("cname " ++ domain) (addCName domain) |
