From 432cbefafb4145525639acb20984d7c1beb33c0d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 2 Jun 2016 18:27:23 -0400 Subject: comment --- ...ent_2_1abdc8ae6e1a00f02fa0130d845ec236._comment | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment (limited to 'doc/forum/functions_that_yield_properties') 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 +"""]] -- cgit v1.2.3