On 2014-08-05 19:03, Ritesh Nanda wrote:The ruby DSL is deprecated and will be removed in Puppet 4.
Hello ,
I would like to use ruby dsl in my manifest . Online doc for this topic
is very limited , i am stuck at a place where i want to use ruby DIr
class to find a particular file in a directory and then run operation on
it .
Is it possible to use ruby dsl for puppet in this way.
What you want is probably to write a function in Ruby.
The deprecated Ruby DSL was a way to write manifests in .rb files instead of .pp files.
If what you want to do is something that executes on the master side, you implement it as a function. If it is something that should run on the agent, it is implemented as a resource type.
Regards
- henrik
Regards,
Ritesh Nanda
--
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+unsubscribe@googlegroups.com
<mailto:puppet-users+unsub...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/lkge4q%24tb1%241%40ger.gmane.org.
--
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+unsubscribe@googlegroups.com.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/lkhabk%24uj1%241%40ger.gmane.org.
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.
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 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...@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.
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 .
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/753fb5f8-0394-4be7-9a64-9d2a8fcc6ecf%40googlegroups.com.