On Mon, Aug 13, 2012 at 11:55 AM, ZJE <countac...@gmail.com> wrote: > > Is the output of a command called by puppet stored somewhere on the master or > agent? > > For example, if have the statement > --- > commands :ls => "ls" > --- > > and then I try something like " ls, '/' " > > where does the output of "ls /" go? I've tried poking around in vardir on > both the master and the agent with no luck. I'm probably just missing it, but > this would help with some debugging. I'm looking for both stdout and stderr.
Puppet doesn't capture the output of commands in a persistent way like it does with the `logoutput` parameter for the exec type. It does get written to a tempfile, but deleted soon after. However, you could easily modify lib/puppet/provider.rb, line 121 (in 2.7.x), to output the result of calling `execute(cmd)`. That call will return the combined stdout and stderr output as a string. Josh -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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.