On 2 mrt 2011, at 21:06, no-re...@cfengine.com wrote:

> Forum: Cfengine Help
> Subject: ex_list and purge conflict?
> Author: hartikka
> Link to topic: https://cfengine.com/forum/read.php?3,20878,20878#msg-20878
> 
> Hi all,
> 
> I am one week into my cfengine experience.
> My first goal is to control the contents of a few directories related to our 
> product.
> 
> I have a test machine acting as its own policy server. 
> (Soon I'lll make the policy server remote.)
> And, I have a few directories under cfengine3 control.
> 
> +++++++++++++++++++++++++++++++++++
> 
> My problem:
> 
> I want to make a few exceptions: 
> There are files scattered around the controlled directories that I need to 
> allow the user to change.
> For now, I'm satisfied with letting these files change in any way at all.
> (Eventually, maybe I'll allow only certain legal forms of difference from 
> master.)
> 
> I tried using ...
> 
> body file_select ex_list
> 
> ... and listing the exceptions. But I also have ...
> 
> body copy_from mycopy(from, server)
>    purge => "true";
> 
> ... to keep unwanted files out of my controlled directories. 
> 
> With purge => true, the files in my ex_list get purged by cf-agent.
> 
> What's the simplest way to allow files to change while purging party crashing 
> files?


The files that you defined in ex_list must also be in the purge directory as 
placeholder. Then the files won't be purged. It is weird maybe we must do 
feature request that the files will be left alone when there are in the 
ex_list. Here is an example:

ex_list => { skip_file };

In the directory were the files are that must be copied, I create the file:
skip_file 

with the following content:
{{{
Only a placeholder else the file will be deleted
}}}


--
Bas van der Vlies
b...@sara.nl



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

Reply via email to