On Mon, 2012-10-22 at 10:28 +0200, Martin Willemsma wrote:
Hi All,

I was wondering if it is possible to NOT show an event in puppet dashboard.
I have an exec resource that fires of a ruby script. This is triggering a
changed event on every run, but actually I want to exclude this from
showing up as "CHANGED"

Is this possible, if so how can I achieve this?
There's actually a trick you can do with the 'onlyif' and 'unless'
options to the exec type that can accomplish what you want. The expense
is that you no longer get log output from the command on failure:

exec {
"run_myscript" :
unless => "/usr/bin/env ruby ${my_script} ${csv_files}",
command => "/bin/false",
cwd => "${myscript_dir}",
timeout => 0,
logoutput => "on_failure",

(This will show up as an error in the puppet run if the command fails,
but not show up at all if it succeeds.)

However, you mentioned something about facts generation in a later post?
Do keep in mind that facts are uploaded to the puppet master *before*
any of the code in your manifest executes, so anything done in your
manifest will only affect the facts for the next puppet run.

Calvin Walton <calvin.walton@kepstin.ca>

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
grouppuppet-users @
postedOct 22, '12 at 8:28a
activeOct 24, '12 at 8:47p



site design / logo © 2022 Grokbase