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

OK, I've spotted my blunder.
Since i'm doing a copy, the path_name should refer to the copy source path.
>From 
>http://www.cfengine.org/manuals/cf3-reference.html#files-in-agent-promises:
   "When we are copying or linking to a file source, it is the search over the 
remote source that drives the content of a promise "

So if I change the file_select body to this, it works like a dream...


# Things NOT to match
leaf_name   => { "yp.conf",
                 "rsnapshot_primary.conf"
               };
# Assumption: this is for copy, so matching is done for "remote" (copy source) 
paths
path_name   => { "$(cf_source)/etc/cron.d/.*",
                 "$(cf_source)/etc/cups/.*"
               };

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


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

Reply via email to