On 12/13/2010 03:39 PM, Gergely Paljak wrote:
> Hi,
> 
> On 7 December 2010 15:43, Felix Frank <felix.fr...@alumni.tu-berlin.de
> <mailto: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_Functions
>     functions
>     > 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?

You may want to consider this thread:

http://groups.google.com/group/puppet-users/browse_thread/thread/f1a71cfd423eb89d/bea212d47ef9a938?hl=en&lnk=gst&q=obtaining+stdout+information+from+client+configuration+executions#bea212d47ef9a938

(Google Groups is an ass for not including a link *to the friggin
thread* in the automatic message footers, btw! Yes, Google, I'm talking
to you!)

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.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to