Hi Raghuram,
yes you can! Simply call the function in the plan, just like you would if
calling the function from a standard Puppet manifest.
For example, say you have a function module1::myfunction()
in
/etc/puppetlabs/code/environment/production/modules/module1/lib/puppet/functions/module1/myfunction.rb.
Calling that function in your plan looks like this:
plan module1::myplan(
String $some_param
){
$result = module1::myfunction($some_param)
}
Kind regards,
KevinR
On Thursday, August 27, 2020 at 11:51:49 AM UTC+2 [email protected]
wrote:
> Hi All,
>
> If we have a function inside
>
> /etc/puppetlabs/code/environment/production/modules/<module>/lib/puppet/functions/<module>/<func.rb>
>
> Is it possible to call the func.rb in a plan residing inside
> /etc/puppetlabs/code/environment/production/modules/<module>/
> plans/<plan.pp>?
>
> In the mentioned case above both .pp file and .rb file are in *same*
> module.
> If it is possible then how can we accommodate that.
>
> Thanks
> Raghuram
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/75709e3b-bf29-4cf0-bc6d-2238c35becbfn%40googlegroups.com.