Forum: Cfengine Help
Subject: Re: ex_list and purge conflict?
Author: hartikka
Link to topic: https://cfengine.com/forum/read.php?3,20878,20963#msg-20963

To say that last question another way:

How do I confine the effect of ex_list() to the folder where I want to make the 
exception?

That is what  if I have...

blah/sub1/file.txt
blah/sub2/file.txt

...and I want 

 1) the copy under sub2 to be allowed to change 
 2) the copy under sub1 is controlled.
 3) sub1 and sub2 are purged of anyfile not in their masters

Looks like I can do this:


vars:
        "masters"               string  =>      "blah";
        "sub1_excludes"        slist   =>      { ".*\.pv", ".*\.pt", ".*\.eq", 
".*PRES.cf"};
        
files:

        "blah/sub1"
                ...
                file_select     =>      ex_list("@(sub1_excludes)"),
                ...

        "blahsub2"
               # no ex_list


Is that the way a fluent speaker would do it?
Is there a better way?

Thanks,
Ron

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

Reply via email to