Hello,
Just trying to write a custom function. Basically looking to pass an
argument from manifest and value should get calculated.
module Puppet::Parser::Functions
newfunction(:shmmax, :type => :rvalue) do |args|
def shmmax(args)
product = args * 1024 * 1024 * 1024
return product
end
end
end
@ foo.pp
$shmmax_variable = shmmax(2)
sysctl { "kernel.shmmax" : val => $shmmax_variable }
In this case I'm expecting a value of
2147483648 for kernel.shmmax in
sysctl.conf file
Its just fails, Any pointer what is wrong here ?
Regards,
Ashish Jaiswal.