If you leave the dest= directive as a path with no filename, i.e. dest=/tmp/, does that work? I don't have any examples of doing a copy like that in my cf.* files, but I can't imagine any other way they would have implemented iteration.

Paul Krizak                         5900 E. Ben White Blvd. MS 625
Advanced Micro Devices              Austin, TX  78741
Linux/Unix Systems Engineering      Phone: (512) 602-8775
Microprocessor Solutions Sector


Yves Blusseau wrote:
Hi, all,

I want to use a list to copy some files.

The tutorial manual said that the list can be use only in the "from" field of a copy action: It is convenient to be able to use such variables to force cfagent to iterative over a list. This gives us a compact way of writing repeated operations and it allows a simple method of communication with the shell environment. For security reasons, iteration is supported only in the following contexts:
 * in the `from' field of a copy action

I write this little script:
...
control:
    listOfFiles = ( foo:bar:baz )
...
copy:
    any::
$(my_cfconfigs)/files/$(listOfFiles) dest=/tmp/$(listOfFiles) server=$(policyhost)
...


But the above fails, since it try to copy every files (foo, then bar, then baz) to /tmp/foo:bar:baz (the list in dest isn't split).
So how to write a copy action with a list of source files ?

Thanks in advance.
Yves


_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to