On Mon, Dec 13, 2010 at 10:29 AM,  <no-re...@cfengine.com> wrote:
> Forum: Cfengine Help
> Subject: Template copy, edit, then expand
> Author: bbomgardner
> Link to topic: https://cfengine.com/forum/read.php?3,19765,19765#msg-19765
>
> I have a need to make an edit to a certain global template for a particular 
> group of hosts.  This is causing me to change my initial template design but 
> I still wanted to post this question:  What is a good way to accomplish 
> convergence with templates and edit_lines?
>

I was hoping somebody with some cfe3 experience would answer this question.

In cfengine 2 I "solved" this problem by using a temporary directory
to build the templates, something like this:

actionsequence = ( copy.temp, editfiles, copy.finish, services)

copy.temp:
<Update /masterfiles from server>
<Copy the template from /masterfiles to /construction>

editfiles.service1:
<make changes to file in /construction>

editfiles.host1:
<make other changes>

copy.finish
<copy file from /construction to destination>
<define 'service_restart' if it's different>

services.service_restart
<restart the service>

-- 
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to