Forum: CFEngine Help
Subject: Re: Permissions and ownership with recursive copy_from
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,25291,25394#msg-25394
You can use the module protocol to dynamically create variables, and then you
can use as complicated of logic as you want. I don't know if the module
protocol allows creation of arrays yet or not, but you could easily create
"perms__path_to_file" and in CFEngine do canon("perms${filepath}").
Modules are a relatively expensive way to do it, though. Probably better to
have an external file, or to just directly edit the CFEngine policy files. I
wrote a perl CFEngine parser a while back using Parse::RecDescent to build a
tree structure representing the policy. It's not done yet, but if that's the
route you want to follow, I'd happily share the code.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine