summaryrefslogtreecommitdiff
path: root/doc/forum/Supported_OS/comment_1_f324bed708305e2667bd00f80544dd90._comment
blob: 094fa678c2745cb20bad0829943900079bf7ef42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[[!comment format=mdwn
 username="joey"
 subject="""comment 1"""
 date="2014-12-07T15:58:03Z"
 content="""
I have heard of propellor being used on OSX. Probably that user wrote their
own code for OSX specific stuff.

Propellor properites can be parameterized by OS. Currently it has support
for Debian and some untested support for Ubuntu. A property can be parameterized
like this:

[[!format haskell """
foo :: Property
foo = property "foo" withOS desc $ \o -> case o of
                (Just (System (Debian _) _)) -> ensureProperty fooDebian
                (Just (System (Ubuntu _) _)) -> ensureProperty fooUbuntu

The first step for adding a new OS will be to modify <http://hackage.haskell.org/package/propellor-1.0.0/docs/Propellor-Types-OS.html>.
Compilation will then warn about all OS parameterized properties that
need to be updated to support your added OS, and it can be taken from there.

I'll accept reasonable patches to support other OS's.
"""]]