Commit 4c354642 authored by Volker Hilsheimer's avatar Volker Hilsheimer

Use merge_yaml logic for merging defaults

This allows removing of defaults or global values, ie

roles:
  - ~ # yaml for nil -> removes all global and default roles
  - only_local
parent 29fff115
......@@ -85,10 +85,10 @@ def load_boxes(yaml, user_yaml, include_defaults)
# make deep copies
default_value = value.dup
machines.each do |machine|
if machine[setting].kind_of?(Array)
machine[setting].concat(default_value)
elsif machine[setting].nil?
if machine[setting].nil?
machine[setting] = default_value
else
machine[setting] = merge_yaml(default_value, machine[setting])
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment