Feature #3309
closedSupport deep merging of hash structures in smart class parameters
Description
When storing complex hashes in smart variables/class parameters (i.e. JSON/YAML), the matchers simply override previous values with a certain precedence order.
Instead, we want to be able to deep merge data across the matchers, so a hash can be built up with a culmination of data.
Steps to Reproduce:
1. set a parameter/variable matcher order to "fqdn", "hostgroup", set data type to JSON
2. add an override of "hostgroup=Example" (change as appropriate), value: {"example":{"foo":"bar"}}
3. add an override of "fqdn=foo.example.com" (change), value: {"example":{"bar":"baz"}}
4. check YAML output on foo.example.com's host page
Actual results:
example:
bar: baz
Expected results:
example:
foo: bar
bar: baz
We should probably do the same for arrays too, e.g.
admin_users = []
hostgroup = [user1, user2]
location = [user3, user4]
admin users = [user(1..4)]