Commit e4a28450 authored by jtimberman's avatar jtimberman
Browse files

cook-114, if the node is a server, don't manage the remote.conf per client

parent bfcec7d3
......@@ -21,7 +21,8 @@ include_recipe "rsyslog"
rsyslog_server = node[:rsyslog][:server] ? node[:rsyslog][:server] : search(:node, "rsyslog_server:true").map { |n| n["fqdn"] }
template "/etc/rsyslog.d/remote.conf" do
unless node[:rsyslog][:server]
template "/etc/rsyslog.d/remote.conf" do
source "remote.conf.erb"
backup false
variables :server => rsyslog_server, :protocol => node[:rsyslog][:protocol]
......@@ -29,10 +30,11 @@ template "/etc/rsyslog.d/remote.conf" do
group "root"
mode 0644
notifies :restart, resources(:service => "rsyslog"), :delayed
file "/etc/rsyslog.d/server.conf" do
file "/etc/rsyslog.d/server.conf" do
action :delete
notifies :reload, resources(:service => "rsyslog"), :delayed
only_if do File.exists?("/etc/rsyslog.d/server.conf") 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