variable_dict_merge_tolerant

Define a variable resulting of the merge of two other variables, allowing merging undefined variables.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
prefixThe prefix of the variable name.

This parameter is required.
nameThe variable to define, the full name will be prefix.name.

This parameter is required.
first_variableThe first variable, which content will be overridden in the resulting variable if necessary (written in the form prefix.name).

This parameter is required.
second_variableThe second variable, which content will override the first in the resulting variable if necessary (written in the form prefix.name).

This parameter is required.

Example

method: variable_dict_merge_tolerant
params:
  first_variable: VALUE
  prefix: VALUE
  name: VALUE
  second_variable: VALUE

Documentation

To use the generated variable, you must use the form ${prefix.name[key]} with each name replaced with the parameters of this method.

See variable_dict_merge for usage documentation. The only difference is that this method will not fail if one of the variables do not exist, and will return the other one. If both are undefined, the method will still fail.