(EDIT by jimis: Initial title was "Add variablevaluesmatching function", but it was edited to depict the actual function added.)
It would be useful if we had a function that could collect the values
of variables that match a name and tag ( much like
=variablesmatching()= ) and put them into a list, or a data container.
Typically when I find variables that match something, I am most
interested in their values. For example, lets say that I want to have
a policy that provides file integrity monitoring as a service. To use
the service you must simply tag a variable that contains the path to a
file with a special tag. At the end of the bundlesequence the bundle
looks for all variables with the special tag, and applies a changes
body to the value of each found variable.
Currently in order to do this I double dereference the variable.
When it could be simply:
Another use case would be for purging files.
Imagine that you are managing a directory of config snippets, similar
to /etc/sudoers.d A variable containing the path to each file you are
checking could be defined with a special tag, for example keep. That
tag could be used in a file_select body to exclude the path to each
file that was tagged for keeping.