Hi,
On 02/18/2011 12:33 AM, Bryan wrote:
> I'm using puppet 0.25.1. I've got a simple resource:
>
> exec { "/bin/ls $oracle_base/dba/bin/database_backup.ksh":
> logoutput => on_failure,
> }
>
> and I don't want it to log every time it's successfully run:
>
> $ sudo tail -F /var/log/messages | grep puppetd
> Feb 17 16:36:11 test puppetd[26614]: (//my_module/Exec[/bin/ls /u01/
> app/oracle/dba/bin/database_backup.ksh]/returns) executed successfully
>
> but logoutput => on_failure doesn't suppress the above message.
First of: What the hell? What do you need that for? You don't seem to be
subscribing to it.
> Is that parameter not available in my version of puppet, or am I
> perhaps misunderstanding its purpose? I'm guessing the latter since
> it looks like it was introduced 3 years ago.
>
> In the meantime, I'm using this ugly, redundant hack to do what I
> want:
>
> exec { "/bin/ls $oracle_base/dba/bin/database_backup.ksh":
> unless => "/bin/ls $oracle_base/dba/bin/database_backup.ksh",
> }
There's indeed a misunderstanding. Puppet will always drop a notice
about a resource that changes (i.e., an exec that is run).
log_output allows puppet to include the stdout of the exec'd process in
its logs.
What you're looking for is e.g.
loglevel => debug
HTH,
Felix
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.