I'm trying to make my own function. I keep getting this message.
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Function 'brent_k' does not return a value at /etc/puppet/modules/munin/manifests/init.pp:17 on node XYZ.com
Here is my simple code
xyz.com:/etc/puppet/modules/munin/lib/puppet/parser/functions# cat brent_k.rb module Puppet::Parser::Functions newfunction(:brent_k, :type => :rvalue) do |args| val = 'ok' val end end
And then in my manifest, I have
$a = brent_k()
I tried return val
too. How can I fix this?