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 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/lkhabk%24uj1%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.