diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-06-02 18:27:23 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-06-02 18:27:23 -0400 |
| commit | b0812d5abbb558a9ce7a05ec7778ff5f99658a1c (patch) | |
| tree | 4f3d546e7b342f4aa998b4f784bad4f517a34d8f /doc/forum/functions_that_yield_properties | |
| parent | 6ff8ba7e80493edb1bfa4f993c56b99da264054a (diff) | |
| parent | 432cbefafb4145525639acb20984d7c1beb33c0d (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'doc/forum/functions_that_yield_properties')
| -rw-r--r-- | doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment | 23 |
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 +"""]] |
