Can you reply with at least one example?
I would expect you have something like a files promise with a copy_from body
paired with a file_select body to choose your files
And we have a by_name body in masterfiles in lib/
packages.cf
Setting up I do this:
```
# touch /var/cfengine/data/client_1_md5_5454eez4r6e4rez46r4ez6.txt
# touch /var/cfengine/data/client_2_md5_0316046ezaea4654re654.txt
# touch /var/cfengine/data/client_3_md5_5454eez4r6e4rez46r4ez6.txt
So I would expect you might try policy like the following. I put it in my services/
main.cf just to test.
```
bundle agent main
{
files:
"/tmp/client_stuff/."
create => "true";
"/tmp/client_stuff"
copy_from => secure_cp("$(sys.workdir)/data", "$(sys.policy_hub)"),
depth_search => recurse(inf),
file_select => by_name("client_.*_md5_5454eez4r6e4rez46r4ez6.txt");
}
```
Maybe you don't want to serve the files from $(sys.workdir)/data? That is accessible by default in controls/
cf_serverd.cf.
```
"$(def.dir_data)/"
handle => "server_access_grant_access_data",
shortcut => "data",
comment => "Grant access to data directory",
if => isdir( "$(def.dir_data)/" ),
admit => { @(def.acl) };
```
So if you wanted to share /tmp/data you would have to add something like
```
"/tmp/data"
if => isdir("/tmp/data/"),
admit => { @(def.acl) };
```
Let us know if that helps and what other questions you have.
Cheers,
Craig Comstock
CFEngineer/Digger