Greetings!
Please review the pull request #60: (#9167) Do not sent tagmail reports if no changes opened by (khightower)
Some more information about the pull request:
- Opened: Thu Aug 25 04:25:53 UTC 2011
- Based on: puppetlabs:master (da4a2def42639817c4522fc0162bd691956998da)
- Requested merge: khightower:bug/master/9167 (e8c0c799e6f648a90028ce2248e14247f021f1c7)
Description:
Prevent Puppet Master from sending tagmail reports if the status of the
puppet run is "unchanged".
Thanks!
The Pull Request Bot
Diff follows:
diff --git a/lib/puppet/reports/tagmail.rb b/lib/puppet/reports/tagmail.rb index c37341e..cf33cfa 100644 --- a/lib/puppet/reports/tagmail.rb +++ b/lib/puppet/reports/tagmail.rb @@ -108,6 +108,12 @@ Puppet::Reports.register_report(:tagmail) do # Process the report. This just calls the other associated messages. def process + # Do not send the email report if nothing changed. + if self.status == "unchanged" + Puppet.info "Not sending tagmail report; no changes" + return + end + unless FileTest.exists?(Puppet[:tagmap]) Puppet.notice "Cannot send tagmail report; no tagmap file #{Puppet[:tagmap]}" return diff --git a/spec/unit/reports/tagmail_spec.rb b/spec/unit/reports/tagmail_spec.rb index a53d119..0df67ec 100755 --- a/spec/unit/reports/tagmail_spec.rb +++ b/spec/unit/reports/tagmail_spec.rb @@ -88,4 +88,9 @@ describe tagmail do results.should be_nil end end + + describe "when there are no changes" do + it "should not send an email" + end + end
--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.