Commit c9ecbaed authored by jtimberman's avatar jtimberman
Browse files

Merge branch 'COOK-2377'

parents 5388c8b8 775329b2
......@@ -2,7 +2,7 @@
# Cookbook Name:: rsyslog
# Recipe:: client
#
# Copyright 2009-2011, Opscode, Inc.
# Copyright 2009-2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -26,7 +26,7 @@ elsif !node['rsyslog']['server']
search(:node, node['rsyslog']['server_search']).first['ipaddress'] rescue nil
if rsyslog_server.nil?
raise "The rsyslog::client recipe was unable to determine the remote syslog server. Checked both the server_ip attribute and search()"
Chef::Application.fatal!("The rsyslog::client recipe was unable to determine the remote syslog server. Checked both the server_ip attribute and search()")
end
template "/etc/rsyslog.d/49-remote.conf" do
......@@ -44,7 +44,6 @@ elsif !node['rsyslog']['server']
end
file "/etc/rsyslog.d/server.conf" do
only_if do ::File.exists?("/etc/rsyslog.d/server.conf") end
action :delete
notifies :reload, "service[#{node['rsyslog']['service_name']}]"
end
......
......@@ -2,7 +2,7 @@
# Cookbook Name:: rsyslog
# Recipe:: default
#
# Copyright 2009-2011, Opscode, Inc.
# Copyright 2009-2013, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
......@@ -17,21 +17,14 @@
# limitations under the License.
#
include_recipe "rsyslog"
node.set['rsyslog']['server'] = true
node.save unless Chef::Config[:solo]
directory ::File.dirname(node['rsyslog']['log_dir']) do
owner node["rsyslog"]["user"]
group node["rsyslog"]["group"]
recursive true
mode 0755
end
include_recipe "rsyslog"
directory node['rsyslog']['log_dir'] do
owner node['rsyslog']['user']
group node['rsyslog']['group']
recursive true
mode 0755
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