Ask Your Question
0

example42-perl creates notices on each run

asked 2015-07-30 07:11:57 -0500

Maymann gravatar image

Hi, I'm running Puppet 3.7.5 and have just installed latest Example42-perl module:

├── example42-perl (v2.0.20)
├── example42-puppi (v2.1.11)

I have created my own module gnperl to handle perl and modules installed on our servers. My module looks like this:

class gnperl {
  include perl
  perl::cpan::module { 'Math-FFT': }
  perl::cpan::module { 'Module-Build': }
  perl::cpan::module { 'Module-CoreList': }
  perl::cpan::module { 'Tk': }
  perl::cpan::module { 'XML-Parser': }
  perl::cpan::module { 'Tcl': }
  perl::cpan::module { 'Tkx': }
}

for each "puppet agent -t" run on client I get the following notices:

notice: /Stage[main]/Perl::Cpan/Exec[configure_cpan]/returns: executed successfully
notice: /Stage[main]/Gnperl/Perl::Cpan::Module[Math-FFT]/Exec[cpan-Math-FFT-present]/returns: executed successfully
notice: /Stage[main]/Gnperl/Perl::Cpan::Module[Module-CoreList]/Exec[cpan-Module-CoreList-present]/returns: executed successfully
notice: /Stage[main]/Gnperl/Perl::Cpan::Module[Module-Build]/Exec[cpan-Module-Build-present]/returns: executed successfully
notice: /Stage[main]/Gnperl/Perl::Cpan::Module[XML-Parser]/Exec[cpan-XML-Parser-present]/returns: executed successfully

I'm using foreman to track puppet runs, and this shows up as "Active" (instead of "No Change") because of this notice. Am I doing something wrong here or is there a way to only run if there are changes that needs to be done ?

Br. Michael Maymann

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-08-05 08:24:40 -0500

unfortunately exec always returns success or fail .. there is a logoutput attribute but that only controls output of command not pass/fail.

you could maybe change the exec so that it subscribes to something else .. e.g. for cpan :

file {"/root/.cpan/CPAN/MyConfig.pm"}

then in exec:

subscribe => File["/root/.cpan/CPAN/MyConfig.pm"] refreshonly => true

and similarly for the modules...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-30 05:00:45 -0500

Seen: 73 times

Last updated: Aug 05 '15