Commit 9bc637f9 authored by Luis Davim's avatar Luis Davim
Browse files

don't break if custom_remote is not set

parent c73a5f6a
......@@ -38,7 +38,7 @@ server_ips.each do |ip|
rsyslog_servers << { 'server' => ip, 'port' => node['rsyslog']['port'], 'logs' => node['rsyslog']['logs_to_forward'], 'protocol' => node['rsyslog']['protocol'], 'remote_template' => node['rsyslog']['default_remote_template'] }
end
unless node['rsyslog']['custom_remote'].first.empty?
unless node['rsyslog']['custom_remote'].empty? || node['rsyslog']['custom_remote'].first.empty?
node['rsyslog']['custom_remote'].each do |server|
if server['server'].nil?
Chef::Application.fatal!('Found a custom_remote server with no IP. Check your custom_remote attribute definition!')
......
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