Forum: CFEngine Help
Subject: Re: The right order
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,25087,25096#msg-25096

Hi Marco,

First of all, *aw shucks* thanks for the very nice words about the book in your 
post :)

Second, I would agree with everything that Mark said, and encourage you to look 
at the new edit_template attribute. It makes things like this much easier by 
allowing you to embed class-conditioned blocks in a file template, among other 
things.

Third, whenever I find myself trying too hard to bend CFEngine's behavior into 
my way of thinking, I try to step back and look at the bigger picture. In this 
particular case, I would wonder whether order in this file is really important, 
or if I want it just for aesthetic benefit. If order is really important, is it 
just within certain blocks? When you could use the preserve_block attribute.

And a final technique I try is to remove all my flow-control code (class 
settings and conditions) and write just the CFEngine code, and try it out. More 
often than not CFEngine surprises me by doing the right things without needing 
my handholding.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to