Thanks everyone for your input and information. Yes, the flexibility of 
cfengine allows the user to design whatever solution they require. I have 
updated my configuration with an applicable solution  and works as expected. 

However, be that as it may, I would have thought that replace_patterns would 
come before insert_lines. I say this because, if replace_patterns corrects the 
line in the file first, by default insert_lines will not insert a duplicate 
line subsequently (as per my example).  

The inverse, meaning, to insert_lines first then replace_patterns second 
requires a class to be defined (by the user) in insert_lines, then referenced 
in replace_patterns as to avoid a duplicate line.  

Yes, the outcome is the same, but it wouldn't need a class explicitly defined, 
in this case, and just a little less typing and code to worry about. Just my 
opinion.

Regards, Jim




---
Sent From Bloomberg Mobile MSG

---- Original Message ----
From: no-re...@cfengine.com
At: 5/24/2011 17:36

Forum: Cfengine Help
Subject: Re: question on replace_patterns and insert_lines
Author: debheller
Link to topic: https://cfengine.com/forum/read.php?3,22198,22224#msg-22224

Thanks for responding, Diego.  Jim, I'm not trying to hijack your thread - but 
I thought it is useful to point out in the context of writing promises that you 
have to think more about how cfengine executes.

I'd be the first to admit, that I still struggle with the "how" of cfengine's 
declarative ways, still trying to find the best way to take advantage of that 
with promises.

_______________________________________________
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

Reply via email to