Hello John,

Thanks for your reply , ruby code i was trying to run was on client , so i
am doing with inline_template right now , yeah but your idea seems good to
have a plugin to do it .

I would start thinking on it , thanks for your help.

Regards,
Ritesh


On Fri, May 9, 2014 at 11:46 AM, jcbollinger <john.bollin...@stjude.org>wrote:

>
>
> On Thursday, May 8, 2014 12:36:56 PM UTC-5, Ritesh Nanda wrote:
>>
>> Thanks Henrik ,
>>
>> I would like to find a file and  parse it  , so that would be on the
>> agent , creating a puppet function would not work , as master  will not be
>> able to access those files.
>>
>
>
> Neither would anything written in Ruby DSL, for much the same reason.
>
>
>
>> You said Can be done with Resources , how can i include a ruby block in
>> my manifest , i know using exec resource i can run a ruby script , but any
>> better way to do it.
>>
>>
>
> You can execute more or less arbitrary Ruby code from your manifest via an
> ERB template, using the built-in template() or inline_template() function.
> You can serve some purposes for which you might want Ruby by enabling and
> using the 'future' parser.  But all of that runs on the master, in order to
> build a "catalog" describing the resources and properties to manage on the
> target node.
>
> If you want to run custom Ruby code on the client as part of a Puppet run
> then you must build a 
> plugin<http://docs.puppetlabs.com/puppet/#hacking-and-extending-ruby-plugins>with
>  which Puppet (or Facter) will do so.  If the purpose is to gather
> information to inform catalog construction, then your plugin should be a 
> custom
> fact <http://docs.puppetlabs.com/guides/custom_facts.html>.  If the
> purpose is to modify the system then you want a custom resource type and
> a provider for it <http://docs.puppetlabs.com/guides/custom_types.html>.
>
>
> John
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/3lD1tChZQJw/unsubscribe.
> To unsubscribe from this group and all its topics, 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/c92d012d-99c6-4de3-b74e-44beda2e3622%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/c92d012d-99c6-4de3-b74e-44beda2e3622%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 


* With Regards  *


* Ritesh Nanda*


 <http://www.ericsson.com/>

-- 
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/CAO5CbpAdX4mpR_%3DEQQ%2BoiF3Snt8eTCcpFkU2pZdHF%2BetLRmMyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to