Hi,

On 7 December 2010 15:43, Felix Frank <felix.fr...@alumni.tu-berlin.de>wrote:

> On 11/29/2010 02:23 PM, Gergely Paljak wrote:
> > Hi,
> >
> > I am fairly new to puppet, and my question would be:
> >
> > - is it possible to write new function and use them in standalone mode?
> > According to
> >
> http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functionsfunctions
> > can only be executed on a server, is there any possibility to overcome
> > this in standalone?
>
> I haven't tried adding custom functions, but if you add them to the node
> running puppet, I cannot see why it should only work for a puppetmaster.
> The documentation might be written in such a way as to point out that
> puppetd is not going to sync your custom functions (from the master) to
> the client node.
>

This one works just fine, just had to add my own function to the directory
with the rest of the puppet functions.

I think standalone puppet is a whole different story.
>
> > - and is it possible to save the output of an exec resource to a puppet
> > variable? My workaround is to print the stdout to a file and read the
> > file into a puppet variable (with the file function). It works, but not
> > the nicest...
>
> Are you sure you don't want a custom fact instead?
> What you are asking sounds like a rather awkward hack to me.
>

The thing is, I'd like to log the stdout of my exec for auditing, primarily
for failed executions I need some error message, exception trace, etc. But
looks like I will have to write my on exec resource or modify exec. Not
sure, though, if it's possible to return a value from a resource - or is it
only functions?

Thanks,
Gergely


>
> Regards,
> Felix
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to