Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong tag and state_file in file_input in version 3.0.0 #108

Open
AgarFu opened this issue Jan 18, 2016 · 0 comments
Open

Wrong tag and state_file in file_input in version 3.0.0 #108

AgarFu opened this issue Jan 18, 2016 · 0 comments

Comments

@AgarFu
Copy link

AgarFu commented Jan 18, 2016

I can't send a pull request because there is no branch for version 3.0.0, but there is a bug in resources/file_input.rb

I've fix this porting the code from version 2, but it is also fixed in the master branch in a different way.

diff --git a/resources/file_input.rb b/resources/file_input.rb
index a52b2c0..f551300 100644
--- a/resources/file_input.rb
+++ b/resources/file_input.rb
@@ -27,15 +27,15 @@ property :cookbook_source, String, default: 'rsyslog'
 property :template_source, String, default: 'file-input.conf.erb'

 action :create do
-  template "/etc/rsyslog.d/#{priority}-#{new_resource.name}.conf" do
+  template "/etc/rsyslog.d/#{priority}-#{name}.conf" do
     mode '0664'
     owner node['rsyslog']['user']
     group node['rsyslog']['group']
     source template_source
     cookbook cookbook_source
     variables 'file_name' => file,
-              'tag' => new_resource.name,
-              'state_file' => new_resource.name,
+              'tag' => name,
+              'state_file' => name,
               'severity' => severity,
               'facility' => facility
@AgarFu AgarFu changed the title Wrong tag and state_file in file_input in version 3.0.0 and 4.0.0 Wrong tag and state_file in file_input in version 3.0.0 Jan 18, 2016
@tas50 tas50 added the Type: Bug label Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants