Table of Contents
Note : Rudder use a StringTemplate grammar slighlty different from the default one. Rather than using "$" as a variable identifier, the Techniques use "&" to avoid collision with the CFEngine variables
&DNS_RESOLVERS: { "&it&" };separator=", "&
-
Will be remplaced by
"8.8.8.8", "8.8.4.4"
-
Here,
&it&
is an alias for the current item in the list (with no confusion, because there is only one variable)
&POLICYCHILDREN, CHILDRENID : {host, uuid | "/var/rudder/share/&uuid&/" maproot => { host2ip("&host&"), escape("&host&") }, admit => { host2ip("&host&"), escape("&host&") }; } &
-
host
is an alias for the current value of POLICYCHILDREN -
uuid
is an alias for the current value of CHILDRENID - Both item are iterated at the same time, so both list must have the same length
&FILE_AND_FOLDER_MANAGEMENT_PATH:{path |"file[&i&][path]" string => "&path&"; }&
- i is an iterator, starting at 1
The result would be:
"file[1][path]" string => "/var"; "file[2][path]" string => "/bin";
&if(NOVA)& something &endif&
The variable must either be:
- A boolean: If its value is true, then the section will be displayed
-
A variable with the parameter
MAYBEEMPTY="true"
: If the value is not set, then the section won’t be displayed, otherwise it will be displayed
More information can be found here: https://theantlrguy.atlassian.net/wiki/display/ST/ST+condensed+--+Templates+and+expressions