Fix CHEF-19 - Add prefix new_resource to several properties

Signed-off-by: default avatarStefan Wessels Beljaars <swesselsbeljaars@schubergphilis.com>
parent b9bc775d
......@@ -25,18 +25,18 @@ property :cookbook_source, String, default: 'rsyslog'
property :template_source, String, default: 'file-input.conf.erb'
action :create do
log_name = name
template "/etc/rsyslog.d/#{priority}-#{name}.conf" do
log_name = new_resource.name
template "/etc/rsyslog.d/#{new_resource.priority}-#{new_resource.name}.conf" do
mode '0664'
owner node['rsyslog']['user']
group node['rsyslog']['group']
source template_source
cookbook cookbook_source
variables 'file_name' => file,
source new_resource.template_source
cookbook new_resource.cookbook_source
variables 'file_name' => new_resource.file,
'tag' => log_name,
'state_file' => log_name,
'severity' => severity,
'facility' => facility
'severity' => new_resource.severity,
'facility' => new_resource.facility
notifies :restart, "service[#{node['rsyslog']['service_name']}]", :delayed
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