knockout_prefix setting

Here is an example of a deep merge, using the knockout_prefix setting to specify a prefix to indicate a value should be removed from the result:

# common.yaml
---
classification:
classes:
- paessler
- other
# mynode.myorg.net.yaml
classification:
classes:
- -- paessler
- nagios
- webserver

Here, we are indicating that mynode.myorg.net.yaml is not using Paessler for monitoring, but rather Nagios. The use of this lookup returns the correct value, as follows:

lookup({
'name' => 'classification',
'merge' => {
'strategy' => 'deep',
'knockout_prefix' => '--',
},
})

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.35.185