Commit c9ecbaed authored by jtimberman's avatar jtimberman
Browse files

Merge branch 'COOK-2377'

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