Helwig:
> On Tue, 07 Jun 2011 10:29:12 -0500, Jennings, Jared L CTR USAF AFMC 46
> SK/CCI wrote:
> > pwck indeed behaves nicely with its exitcodes - the problem is I
want
> > the output to be an err, not a notice
> 
>   exec { 'pwck -r':
>     path      => '/usr/bin:/bin:/usr/sbin:/sbin',
>     logoutput => on_failure,
>     loglevel  => err,
>     unless    => 'pwck -r',
>   }
> 
> By doing the "unless => 'pwck -r'", the resource won't even show up as
> having been run if 'pwck -r' returns 0.  Having to run the command
> twice is a hack, but it's the best I can think of at the moment.

Ah, that's a good hack. No problem for me, pwck runs quickly enough.

> Seems reasonable that when "logoutput => on_failure" the actual output
> should be logged as an err, instead of a notice.  Would you mind
filing
> a feature request on the issue tracker[1]?

#7877.

Thanks for your help!

-- 
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.

Reply via email to