Forum: CFEngine Help
Subject: Re: copy_from: would like priority list of sources, then silent fail
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,25584,25794#msg-25794
David: yes, it's a global setting. I don't think it can be overridden (or set)
on a per-promise basis. But what you could do is make it specific to the files
to which you want it to apply. The easiest is to set it to ".*" to set it
globally, but to assuage the worry of enabling it on a large established policy
base, you could initially enable it only for the particular files you want. Its
value is a list of regexes, so you could be pretty flexible, something like
this:
files_single_copy => { ".*/foo." };
or
files_single_copy => { "/var/foo.*", "/etc/foo.*", "/usr/foo.*" };
Danny: without looking at the code, I cannot say for certain whether the race
condition you describe is feasible, but I expect there must be some protection
against it. The sure way to avoid it would be to set ifelapsed to be shorter
than the cf-agent execution period (default values are 1 and 5 minutes,
respectively).
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine