You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_userparameters[my.hostname_testing_nginx]: Could not evaluate: wrong number of arguments (given 2, expected 1)
What behaviour did you expect instead
It should work.
Output log
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_userparameters[my.hostname_testing_nginx]: Could not evaluate: wrong number of arguments (given 2, expected 1) /opt/puppetlabs/puppet/cache/lib/puppet/provider/zabbix.rb:93:in check_template_in_host'
/opt/puppetlabs/puppet/cache/lib/puppet/provider/zabbix_userparameters/ruby.rb:25:in exists?' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:in retrieve' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in retrieve_resource'`
Any additional information you'd like to impart
The issue seems to be at the file lib/puppet/provider/zabbix.rb on the line 93, the function check_template_in_host() is only expecting the parameter host, but it should also accept the parameter template.
Making that change this works as expected.
If you want, I can provide a PR with this simple fix.
The text was updated successfully, but these errors were encountered:
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Make use of the Zabbix_userparameters resource. For example:
What are you seeing
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_userparameters[my.hostname_testing_nginx]: Could not evaluate: wrong number of arguments (given 2, expected 1)
What behaviour did you expect instead
It should work.
Output log
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_userparameters[my.hostname_testing_nginx]: Could not evaluate: wrong number of arguments (given 2, expected 1) /opt/puppetlabs/puppet/cache/lib/puppet/provider/zabbix.rb:93:in
check_template_in_host'/opt/puppetlabs/puppet/cache/lib/puppet/provider/zabbix_userparameters/ruby.rb:25:in
exists?' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in
retrieve'/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:in
retrieve' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in
retrieve_resource'`Any additional information you'd like to impart
The issue seems to be at the file
lib/puppet/provider/zabbix.rb
on the line 93, the function check_template_in_host() is only expecting the parameter host, but it should also accept the parameter template.Making that change this works as expected.
If you want, I can provide a PR with this simple fix.
The text was updated successfully, but these errors were encountered: