Forum: Cfengine Help
Subject: path_name fails in file_select
Author: jonb1987
Link to topic: https://cfengine.com/forum/read.php?3,21658,21658#msg-21658

I'd be grateful for some help with the use of "path_name" in the "file_select" 
bundle...

I'm trying to limit the select of files to everything except some directories 
and some files.
So I have this...

#----------------------------------------------------------
bundle agent main {
#----------------------------------------------------------
   files:
         "/"
           file_select  => default_file_select,
           depth_search => recurse("inf"),
           copy_from    => default_copy_from;
}

#----------------------------------------------------------
body file_select default_file_select {
#----------------------------------------------------------
# Things NOT to match
leaf_name   => { "yp.conf",
                 "rsnapshot_primary.conf"
               };

path_name   => { "/etc/cron.d/.*",
                 "/etc/cups/.*"
               };

file_result => "(!path_name).(!leaf_name)";
}


What happens is the leaf_name part is honoured (i.e. yp.conf, 
rsnapshot_primary.conf are NOT copied),
but the path_name part is NOT honoured - i.e. files in directories /etc/cron.d/ 
ARE copied.

So any ideas as to what  am doing wrong?

Thanks in advance

Jon B

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

Reply via email to