Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: th
Link to topic: https://cfengine.com/forum/read.php?3,26723,26946#msg-26946

zzamboni Wrote:
-------------------------------------------------------

> 1. Copy "master file" from its master location to
> /local/template/file. CFEngine will only re-copy
> the file if the master file has changed.
> 2. Apply transforms on /local/template/file, using
> edit_line or whatever you want, to produce
> /local/staging/file. CFEngine will only re-write
> /local/staging/file if, after the edits, it's
> different from what it was before.
> 3. Copy /local/staging/file to /final/file.
> CFEngine will only re-copy the file if it has
> changed.

Hello Diego,

I just went back evaluating this option since it seems to me, for the reasons 
mentionned earlier, the only no-limitation way to both create (if not present) 
and edit (if present) a file (i.e. the best way to promise the whole file) :

Just to be sure : with promises such as edit_line => set_variable_values (just 
as your book's sshd_config example), the only way I can imagine to, as you say, 
"produce" a local staging file would be to copy the "master" file to "staging" 
file. Am I right ?

Thanks

--
TH

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

Reply via email to