Commit 0289af00 authored by Jeff Blaine's avatar Jeff Blaine Committed by jtimberman
Browse files

Reference the existing owner+group attributes instead of harcodes!

parent 957134d7
......@@ -32,8 +32,8 @@ elsif !node['rsyslog']['server']
:server => rsyslog_server,
:protocol => node['rsyslog']['protocol']
)
owner "root"
group "root"
owner node["rsyslog"]["owner"]
owner node["rsyslog"]["group"]
mode 0644
only_if { node['rsyslog']['remote_logs'] && !rsyslog_server.nil? }
notifies :restart, "service[rsyslog]"
......
......@@ -35,14 +35,14 @@ end
cookbook_file "#{node["rsyslog"]["defaults_file"]}" do
source "rsyslog.default"
owner "root"
group "root"
owner node["rsyslog"]["owner"]
group node["rsyslog"]["group"]
mode 0644
end
directory "/etc/rsyslog.d" do
owner "root"
group "root"
owner node["rsyslog"]["owner"]
group node["rsyslog"]["group"]
mode 0755
end
......@@ -54,8 +54,8 @@ end
template "/etc/rsyslog.conf" do
source "rsyslog.conf.erb"
owner "root"
group "root"
owner node["rsyslog"]["owner"]
group node["rsyslog"]["group"]
mode 0644
variables(:protocol => node['rsyslog']['protocol'])
notifies :restart, "service[rsyslog]"
......@@ -65,8 +65,8 @@ if platform?("ubuntu")
template "/etc/rsyslog.d/50-default.conf" do
source "50-default.conf.erb"
backup false
owner "root"
group "root"
owner node["rsyslog"]["owner"]
group node["rsyslog"]["group"]
mode 0644
notifies :restart, "service[rsyslog]"
end
......
......@@ -23,8 +23,8 @@ node.set['rsyslog']['server'] = true
node.save unless Chef::Config[:solo]
directory ::File.dirname(node['rsyslog']['log_dir']) do
owner "root"
group "root"
owner node["rsyslog"]["owner"]
owner node["rsyslog"]["group"]
recursive true
mode 0755
end
......@@ -42,8 +42,8 @@ template "/etc/rsyslog.d/35-server-per-host.conf" do
:log_dir => node['rsyslog']['log_dir'],
:per_host_dir => node['rsyslog']['per_host_dir']
)
owner "root"
group "root"
owner node["rsyslog"]["owner"]
owner node["rsyslog"]["group"]
mode 0644
notifies :restart, "service[rsyslog]"
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