Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 99ba3577 authored by Lucas Nussbaum's avatar Lucas Nussbaum
Browse files

[dev] add 'defaults' section in kadeploy generator

parent 18d5c069
......@@ -180,7 +180,13 @@ end
conf = YAML::load(ERB.new(File.read("#{options[:conf_dir]}/kadeployg5k#{suffix}.yaml")).result(binding))
site['clusters'].each { |cluster_uid, cluster|
data = data = conf[site_uid][cluster_uid]
defaults = conf['defaults']
overrides = conf[site_uid][cluster_uid]
dupes = (defaults.to_a & overrides.to_a)
if not dupes.empty?
puts "Warning: cluster-specific configuration for #{cluster_uid} overrides default values: #{dupes.to_s}"
end
data = data = defaults.merge(overrides)
if data.nil?
puts "Warning: configuration not found in #{options[:conf_dir]}/kadeployg5k#{suffix}.yaml for #{cluster_uid}. Skipped"
next
......
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