Ask Your Question
0

Is it possible to use custom function in custom type definition?

asked 2015-02-04 10:18:55 -0500

michals gravatar image

I'm writing module which will define new types. Inside new property definition I want use custom function (also provided in this module) which will munge passed value, but I get "undefined local variable or method" error.

I also don't have access to stdlib functions inside custom type, but this functions are available in manifest file.

Does someone can provide example how to execute custom function inside type definition especially in munge block?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-02-05 21:48:28 -0500

GregLarkin gravatar image

Have you see this page? https://docs.puppetlabs.com/guides/cu... I wonder if that would solve the issue. Also, please post your code for further review, if you want.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-02-04 10:04:46 -0500

Seen: 261 times

Last updated: Feb 05 '15