Forum: Cfengine Help
Subject: Re: Wildcard in files stanza on copy
Author: kholloway
Link to topic: https://cfengine.com/forum/read.php?3,17887,17899#msg-17899

That is correct it does not work.
I have tried a few more things all met with failure.

My latest test which does go through the .* directories properly but never 
returns a match to the file promise.
I have tried a few variations of this that include the file name as the leaf 
name to the file_select.
I have added depth_recursion and a few other things but again none of it 
returns a match.
Debug output shows it going through all the directories in question but a match 
is never returned so the file is never copied.

Does anyone else use anything that matches a directory name as an unknown and 
if so how are you doing it?

Thanks in advance for any help!

-Kent

---NEW Example---
bundle agent myapp
{
        files:
        solaris::
               "/opt/base1/sub1"
                   file_select => 
path_name("/opt/base1/sub1/.*/weblogic92/config/userdir/myfile"),
                   copy_from => secure_cp("/my/server/path","127.0.0.1");
}

body file_select path_name(path)
{
        # Used to select a file that is in a directory that has a wildcard..
        path_name => { $(path) };
        file_result => "path_name";
}

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

Reply via email to