Am Dienstag, 19. Juli 2016 18:50:45 UTC+2 schrieb Salty Old Cowdawg:
>
> Let me preface everything I'm about to say by saying I only started 
> seriously coding in Ruby about a year ago.  I've been a Perl guy since 1989 
>  and C/C++ and friends for longer than that so I'm not a total newbie.  The 
> question I'm going to ask notwithstanding. :-)
>
> What I'm trying to accomplish is writing a function that will parse text 
> data that will be used as part of a fact, in a custom function for Puppet 
> and several other places within the Puppet ecosphere. 
>
> I've got the parser itself written but I'd hate to think I have to 
> duplicate that code everywhere it's needed.  What would be the best 
> approach to making the subroutine available to a custom fact, custom 
> function and type/provider all at once?
>
> A synopsis of sorts.  The custom fact generates an aggregate fact and the 
> custom function and custom type/provider compare a parameter fed to a class 
> to that value to make a logic decision. 
>
> Ideas?
>

I suspect you would need to create a rubygem and deploy it on all machines? 
but maybe this is more a question for the Puppet Developers mailinglist.

- Thomas 

-- 
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/048da9f3-95ea-4c23-80c1-9a8fd0c75212%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to