machine() add_machine_options fails to merge bootstrap_options #455
Labels
Aspect: Documentation
How do we use this project?
Triage: Confirmed
Indicates and issue has been confirmed as described.
Type: Bug
Doesn't work as expected.
Originally mentioned this in #383 (comment)
Spent more time digging and confirmed that machine()'s add_machine_options uses a different merge strategy than add_machine_options() does.
https://github.com/chef/chef-provisioning/blob/master/lib/chef/provisioning/chef_run_data.rb#L79
vs
https://github.com/chef/chef-provisioning/blob/master/lib/chef/resource/machine.rb#L100
The end result is if you try to merge bootstrap_options at the machine level, you get:
Simple to test:
or
Seems like the fix would be to either consume add_machine_options() for the merge, or switch to using the same DeepMerge strategy. I might be able to get a chance to submit a PR on it...
The text was updated successfully, but these errors were encountered: