Puppet is doing what it is supposed to do: report changed resources. Puppet
isn''t aware of the content of your script, so it treats each run (that
has
an exit code of 0) as if something has changed. I''m guessing that your
script is currently executing each time puppet runs? Can you describe what
this script is doing in general detail? If it''s looking for a certain
situation and doing something if it finds it (and doing nothing if it finds
nothing), for example:
if [ "$(uptime | awk ''{print $3}'')" -gt 7 ]; then
echo ''OMG! I have been up
more than a week!''; fi
then I''d recommend putting the "looking for" portion of the
script into the
''onlyif'' parameter of the exec and the "doing
something" portion in the
''command'' parameter. For example:
exec { ''uptime_test'':
command => "echo ''OMG! My uptime is abysmal!'' >
/etc/motd",
onlyif => ''[ "$(uptime | awk \''{print
$3}\'')" -lt 7 ]'',
}
Here, puppet will only report that the Exec[uptime_test] resource executed
successfully if the computer has been up for less than 7 days. Once the
uptime exceeds that condition, you''ll see no notice from this resource
on
your puppet reports.
--
Peter
On Monday, September 30, 2013 1:52:55 PM UTC-4, Geoff Galitz
wrote:>
>
> Hi.
>
> One of the scripts we run for systems management causes puppet to say:
>
> ----------------
> notice: /Stage[main]/XXXX/Exec[script]/returns: executed successfully
> ----------------
>
> How can I suppress or quiet this output?
>
> -G
>
>
>
>
>
>
>
> --
> -----------------------------------------------
> Geoff Galitz, gga...@shutterstock.com <javascript:>
> WebOps
> Shutterstock Images
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.