Hi, I used following code in puppet3.8.x, it worked well.
After i migrated to Puppet5 it throws error. $header="LD_LIBRARY_PATH=$destdir:\$LD_LIBRARY_PATH\n\nexport LD_LIBRARY_PATH\n" $content = inline_template('<%= header+"\n"+ports.map {|port| memcache_command+" -m "+memory_per_instance+" -p "+port+" &"}.join("\n")+"\n" %>') file { "$destdir/startmemcached.sh": ensure => file, owner => $title, group => $title, mode => '0744', content => inline_template($content), } Error: 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, Failed to parse inline template: undefined local variable or method `header' for #<Puppet::Parser::TemplateWrapper:0x5f6a0cd8> (file: /home/sas/in2_puppet/environments/production/modules/pkg/manifests/memcache/installmemcache.pp, line: 45, column: 12) (file: /home/sas/in2_puppet/environments/production/modules/in2/manifests/memcache/common.pp, line: 13) on node Can you help me on this. Regards, Suresh -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/73deeec3-137f-4c05-9e8f-a63834f6e5ea%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.