summaryrefslogtreecommitdiff
path: root/doc/forum/functions_that_yield_properties
diff options
context:
space:
mode:
Diffstat (limited to 'doc/forum/functions_that_yield_properties')
-rw-r--r--doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment b/doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment
new file mode 100644
index 00000000..34a14616
--- /dev/null
+++ b/doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment
@@ -0,0 +1,23 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2016-06-02T22:21:52Z"
+ content="""
+Another, simpler approach that I often use in my config.hs:
+
+ foo :: Host
+ foo = host "foo.example.com" $ props
+ & User.accountFor myacc
+ & Sudo.enabledFor myacc
+ where
+ myacc = "joey"
+
+You can also bundle up a bunch of properties that
+each need a User into a single combined
+`User -> Property DebianLike`
+
+ myAccountIs :: User -> Property DebianLike
+ myAccountIs u = propertyList ("my user is " ++ u) $ props
+ & User.accountFor u
+ & Sudo.enabledFor u
+"""]]