Forum: Cfengine Help
Subject: Re: Ways to determine which files have been copied in a recursive copy
Author: geertn
Link to topic: https://cfengine.com/forum/read.php?3,19304,19324#msg-19324
Thanks. That seems to do exactly as I had a need for (using regex).
A quick test shows that this feature defines a class for each copied file when
copying recursively.
body agent control {
files_auto_define => { "/testroot/.*" };
}
Bundle agent:
files:
"/testroot/"
copy_from =>
b_copy_from("/var/lib/cfengine3/masterfiles/templates/root", "127.0.0.1"),
depth_search => b_depth_search("inf"),
action => b_action_immediate;
Output:
-> Copying from 127.0.0.1:/var/lib/cfengine3/masterfiles/templates/root/etc/xx
Auto defining class auto__testroot_etc_xx
Pretty slick indeed :-)
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine