Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Cannot Reproduce
-
PUP 6.15.0
-
None
-
None
-
6.15.3
-
Needs Assessment
-
Needs Assessment
Description
Puppet Version: 6.15.0
Puppet Server Version: 6.15.3
OS Name/Version: Centos 7.8
Ruby Version: ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
We have upgraded puppet 5 to 6, then executed our one module which was using templates, it was of course using template function to invoke erb file but on puppet agent run it gives following error:-
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, undefined method `[]' for Puppet::Pops::Loader::RubyLegacyFunctionInstantiator::Puppet:Module (file: /etc/puppet/environments/production/modules/test/manifests/init.pp, line: 4, column: 20) on node xxxxxxxxxxxxxxx
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Content of init.pp:-
class test{
file
{ 'test': content => template('test/test.erb'), ensure => file, path => '/etc/test', }Desired Behavior: Should Render erb file.
Actual Behavior: gives of Error 500 with "undefined method `[]'"