VoyenceControl supports some very basic Velocity-style syntax (see Note statements) to provide the string manipulation logic required to accomplish this task. This functionality allows you to split a delimited list of values and perform the same action on each separate value.
Example
As an example, consider a situation where you have a list of addresses that need to be added to a configuration in some way one at a time:
logging myLoggingHost1
...
logging myLoggingHostN
To accomplish this you could use a single template variable with a delimited list of addresses, then use Velocity syntax to split on the delimiter and action each separate address (see Note statements):
## specify a special variable to hold the delimiter so we can reuse it and only have to change it in one spot
## this delimiter is a regex pattern that looks for 1 or more common delimiters (semi-colon, comma and space)
#set ($DELIM = "[;, ]+")## get a new reference to the template variable's content
#set ($list = "<<myLoggingHostsList>>")
## now to split the list and action each separate address
#foreach ($address in $list.split($DELIM))
logging $address
#end
If you provide the following list to the variable <<myLoggingHostsList>>:
192.168.10.10, 172.17.8.10, 10.10.21.10
The output would be:
logging 192.168.10.10
logging 172.17.8.10
logging 10.10.21.10