Configure merge behavior in data
uses a key’s configured merge behavior in any lookup that doesn’t explicitly override it.
In any data source, including module data:
Use the
lookup_options
key to configure merge behavior.
Results
For
example:
# <ENVIRONMENT>/data/common.yaml
lookup_options:
ntp::servers: # Name of key
merge: unique # Merge behavior as a string
"^profile::(.*)::users$": # Regexp: `$users` parameter of any profile class
merge: # Merge behavior as a hash
strategy: deep
merge_hash_arrays: true
uses the configured merge behaviors for these keys.
Note: The
hiera_*
functions always
override configured merge behavior.