Finally, there's the unpack_arrays setting. Let us change the data for our node again to look as follows, while leaving the common data the same:
# mynode.myorg.net.yaml classification: classes: - --paessler,nagios - webserver
The unpack_arrays setting takes each string, splits it according to the , delimiter, creating an array of, in our example, [“–-paessler”, “nagios”], and then merging it; in our example knocking out the paessler value, since it was indicated with the knockout_prefix as follows:
lookup({ 'name' => 'classification', 'merge' => { 'strategy' => 'deep', 'knockout_prefix' => '--', unpack_arrays =>’,’, }, })