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