[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to use iteration over list variable in copy action ?
From: |
Yves Blusseau |
Subject: |
How to use iteration over list variable in copy action ? |
Date: |
Thu, 12 Jan 2006 10:28:41 +0100 |
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:
a.. 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) mode=0444 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How to use iteration over list variable in copy action ?,
Yves Blusseau <=