Commit b46ac0f1 authored by jtimberman's avatar jtimberman
Browse files

Updating for Chef 0.8 changes.

* Use 'default.rb' for attributes files when specific files not
  necessary
* Update search in rsyslog recipe.
parent 0a500989
......@@ -3,7 +3,7 @@ maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures rsyslog"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version "0.7"
version "0.8"
recipe "rsyslog::client", "Sets up a client to log to a remote rsyslog server"
recipe "rsyslog::server", "Sets up an rsyslog server"
......
......@@ -19,13 +19,16 @@
include_recipe "rsyslog"
rsyslog_server = node[:rsyslog][:server] ? node[:rsyslog][:server] : search(:node, "rsyslog_server:true").map { |n| n["fqdn"] }.first
rsyslog_server = node[:rsyslog][:server] ? node[:rsyslog][:server] : search(:node, "rsyslog_server:true", nil, 0, 1)
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]
variables(
:server => rsyslog_server['fqdn'],
:protocol => node[:rsyslog][:protocol]
)
owner "root"
group "root"
mode 0644
......
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