Open keen99 opened 9 years ago
Note: I'm testing against chef-provisioning (1.3.0) at the moment, but this doesn't seem to have changed since 2014 with fd2effc
We just need to delete add_machine_options
everywhere. See https://github.com/chef/chef-provisioning/pull/457#issuecomment-146016529
Originally mentioned this in https://github.com/chef/chef-provisioning/issues/383#issuecomment-134378241
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...