On Fri, Mar 11, 2011 at 07:13:01AM -0500, Aleksey Tsalolikhin wrote: >In a nutshell, a bundle is a group of one or more promises. > >Whereas a promise BODY is the details of a particular promise that >qualifies it and constrains its nature. > > >need a good example, I think
Apropos of a recent thread about /etc/sudoers... Here's a bundle named "sudoers_perms" that promises to set the permissions on /etc/sudoers (but notably does *not* handle the contents of the file). It relies on a single body named "sudoers_permissions" that has the details of the permissions you want to set. Note that you can use classes in both cases ("linux or solaris" for the promise, and then "SuSE or not SuSE" in the body). Otherwise, I'd have to have two different bodies to set permissions (one for SuSE boxes, and one for non-SuSE). A body can also take arguments, although I don't show that here. <-------snip--------> bundle sudoers_perms { files: linux||solaris:: "/etc/sudoers" comment => "make sure /etc/sudoers has proper permissions", handle => "set_sudoers_permissions", perms => sudoers_permissions; } body perms sudoers_permissions { owners => { "root"}; groups => { "root"}; SuSE:: # Suse uses different permissions # (or used to...) from everyone else mode => "0640"; !SuSE:: mode => "0440"; } <-------snip--------> > >On Fri, Mar 11, 2011 at 3:51 AM, Bas van der Vlies <b...@sara.nl> wrote: >> David, >> >> For me the following documentation helped a lot between the difference >> between bundles and bodies: >> * http://www.cfengine.org/pages/syntax >> >> And then use the reference guide for a better explanation of the options. >> >> >> -- >> ******************************************************************** >> * Bas van der Vlies e-mail: b...@sara.nl * >> * SARA - Academic Computing Services Amsterdam, The Netherlands * >> ******************************************************************** >> _______________________________________________ >> Help-cfengine mailing list >> Help-cfengine@cfengine.org >> https://cfengine.org/mailman/listinfo/help-cfengine >> >_______________________________________________ >Help-cfengine mailing list >Help-cfengine@cfengine.org >https://cfengine.org/mailman/listinfo/help-cfengine -- Jesse Becker NHGRI Linux support (Digicon Contractor) _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine