Commit b0747655 authored by Jérémie Gaidamour's avatar Jérémie Gaidamour
Browse files

[dev] Improved error message for kadeployg5k.rb

parent a8454111
...@@ -135,8 +135,12 @@ end ...@@ -135,8 +135,12 @@ end
conf = YAML::load(ERB.new(File.read($conf_dir + "kadeployg5k#{suffix}.yaml")).result(binding)) conf = YAML::load(ERB.new(File.read($conf_dir + "kadeployg5k#{suffix}.yaml")).result(binding))
site['clusters'].each { |cluster_uid, cluster| site['clusters'].each { |cluster_uid, cluster|
data = data = conf[site_uid][cluster_uid] data = data = conf[site_uid][cluster_uid]
if data.nil?
puts "Warning: configuration not found in #{$conf_dir}kadeployg5k#{suffix}.yaml for #{cluster_uid}. Skipped"
next
end
output = ERB.new(File.read('templates/kadeployg5k.conf.erb')).result(binding) output = ERB.new(File.read('templates/kadeployg5k.conf.erb')).result(binding)
output_file = Pathname("#{$output_dir}/modules/kadeployg5k/files/#{site_uid}/server_conf#{suffix.tr('-', '_')}/#{cluster_uid}-cluster.conf") output_file = Pathname("#{$output_dir}/modules/kadeployg5k/files/#{site_uid}/server_conf#{suffix.tr('-', '_')}/#{cluster_uid}-cluster.conf")
......
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