Table of Contents
Define a variable that contains key,value pairs (a dictionnary)
Compatible with nodes running Rudder 2.11 or higher.
To use the generated variable, you must use the form
${variable_prefix.variable_name[key]}
with each name replaced with the
parameters of this method.
Be careful that using a global variable can lead to unpredictable content in case of multiple definition, which is implicitly the case when a technique has more than one instance (directive). Please note that only global variables are available within templates.
- variable_prefix: The prefix of the variable name
- variable_name: The variable to define, the full name will be variable_prefix.variable_name
- value: The variable content in JSON format
variable_dict_${variable_name}_{kept, repaired, not_ok, reached}
Define a variable that contains key,value pairs (a dictionnary) from a JSON file
Compatible with nodes running Rudder 2.11 or higher.
To use the generated variable, you must use the form
${variable_prefix.variable_name[key]}
with each name replaced with the
parameters of this method.
Be careful that using a global variable can lead to unpredictable content in case of multiple definition, which is implicitly the case when a technique has more than one instance (directive). Please note that only global variables are available within templates.
- variable_prefix: The prefix of the variable name
- variable_name: The variable to define, the full name will be variable_prefix.variable_name
- file_name: The file name with JSON content
variable_dict_from_file_${variable_name}_{kept, repaired, not_ok, reached}
Define a variable that will be automatically iterated over
Compatible with nodes running Rudder 2.11 or higher.
The generated variable is a special variable (slist in cfengine speaking) that is automatically iterated over. When you call a generic method with this variable as a parameter, n calls will be made, one for each items of the variable. Note: there is a limit of 10000 items
To use the generated variable, you must use the form
${variable_prefix.variable_name}
with each name replaced with the
parameters of this method.
Be careful that using a global variable can lead to unpredictable content in case of multiple definition, which is implicitly the case when a technique has more than one instance (directive). Please note that only global variables are available within templates.
- variable_prefix: The prefix of the variable name
- variable_name: The variable to define, the full name will be variable_prefix.variable_name
- value: The variable content
- separator: Regular expression that is used to split the value into items ( usually: , )
variable_iterator_${variable_name}_{kept, repaired, not_ok, reached}
Define a variable that will be automatically iterated over
Compatible with nodes running Rudder 2.11 or higher.
The generated variable is a special variable (slist in cfengine speaking) that is automatically iterated over. When you call a generic method with this variable as a parameter, n calls will be made, one for each items of the variable. Note: there is a limit of 10000 items Note: empty items are ignored
To use the generated variable, you must use the form
${variable_prefix.variable_name}
with each name replaced with the
parameters of this method.
Be careful that using a global variable can lead to unpredictable content in case of multiple definition, which is implicitly the case when a technique has more than one instance (directive). Please note that only global variables are available within templates.
- variable_prefix: The prefix of the variable name
- variable_name: The variable to define, the full name will be variable_prefix.variable_name
- file_name: The path to the file
- separator_regex: Regular expression that is used to split the value into items ( usually: )
- comments_regex: Regular expression that is used to remove comments ( usually: #.*?(?=) )
variable_iterator_from_file_${variable_name}_{kept, repaired, not_ok, reached}
Define a variable from a string parameter
Compatible with nodes running Rudder 2.11 or higher.
To use the generated variable, you must use the form
${variable_prefix.variable_name}
with each name replaced with the
parameters of this method.
Be careful that using a global variable can lead to unpredictable content in case of multiple definition, which is implicitly the case when a technique has more than one instance (directive). Please note that only global variables are available within templates.
- variable_prefix: The prefix of the variable name
- variable_name: The variable to define, the full name will be variable_prefix.variable_name
- value: The variable content
variable_string_${variable_name}_{kept, repaired, not_ok, reached}
Define a variable from a file content
Compatible with nodes running Rudder 2.11 or higher.
To use the generated variable, you must use the form
${variable_prefix.variable_name}
with each name replaced with the
parameters of this method.
Be careful that using a global variable can lead to unpredictable content in case of multiple definition, which is implicitly the case when a technique has more than one instance (directive). Please note that only global variables are available within templates.
- variable_prefix: The prefix of the variable name
- variable_name: The variable to define, the full name will be variable_prefix.variable_name
- file_name: The path of the file
variable_string_from_file_${variable_name}_{kept, repaired, not_ok, reached}