Hello Henrik , Thanks for your reply , i was also thinking to create a type and provider using existing parser functionality puppet has . Even thanks for sharing those links , it was helpful.
Regards, Ritesh Nanda On Thu, May 8, 2014 at 7:17 PM, Henrik Lindberg < [email protected]> wrote: > On 2014-08-05 19:36, 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. >> 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. >> >> Depends on what you are parsing, and what you need to do with the parsed > result. You may find that there is already a module that does what you > want. > > Basically, the logic that does that has to be an implementation of a > resource type. That is what is responsible for syncing the state of the > agent where it is running with what is on that agent. It gets what was > specified in the manifests in a resource, and the provider logic for that > resource type then does the sync. > > That is how all resource types / providers work. > > This may help you: http://doauto.wordpress.com/2013/06/22/how-to-change-a- > file-using-puppet/ > > And you have Augeas where you can write "lenses" (plugins) to Augeas to > handle specific syntax. > > http://docs.puppetlabs.com/guides/augeas.html#loading- > generic-lenses-for-non-standard-files > > http://bombasticmonkey.com/2011/01/02/distributing- > augeas-lenses-with-pluginsync/ > > Hope that helps. > - henrik > > > > -- > 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 > [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/puppet-users/lkhabk%24uj1%241%40ger.gmane.org. > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAO5CbpAbjoMAH_HHPieAJPakYti3oizbSGEk81TmtO8dbm1QGw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
