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" ...@@ -3,7 +3,7 @@ maintainer_email "cookbooks@opscode.com"
license "Apache 2.0" license "Apache 2.0"
description "Installs and configures rsyslog" description "Installs and configures rsyslog"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) 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::client", "Sets up a client to log to a remote rsyslog server"
recipe "rsyslog::server", "Sets up an rsyslog server" recipe "rsyslog::server", "Sets up an rsyslog server"
......
...@@ -19,13 +19,16 @@ ...@@ -19,13 +19,16 @@
include_recipe "rsyslog" 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] unless node[:rsyslog][:server]
template "/etc/rsyslog.d/remote.conf" do template "/etc/rsyslog.d/remote.conf" do
source "remote.conf.erb" source "remote.conf.erb"
backup false backup false
variables :server => rsyslog_server, :protocol => node[:rsyslog][:protocol] variables(
:server => rsyslog_server['fqdn'],
:protocol => node[:rsyslog][:protocol]
)
owner "root" owner "root"
group "root" group "root"
mode 0644 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