summaryrefslogtreecommitdiffstats
path: root/lib/puppet/reports
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-20 22:38:46 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-20 22:38:46 +0000
commitdc8fb0a30154258084c39d62c9ee2fdf6d9c48a6 (patch)
treed067a3e5ba5267041d78cd071c6c04b5de68425d /lib/puppet/reports
parentafed9a17224ab28788b3f64008c13ce18c1ca914 (diff)
downloadpuppet-dc8fb0a30154258084c39d62c9ee2fdf6d9c48a6.tar.gz
puppet-dc8fb0a30154258084c39d62c9ee2fdf6d9c48a6.tar.xz
puppet-dc8fb0a30154258084c39d62c9ee2fdf6d9c48a6.zip
Fixing #292 (A bug in tagmail that causes any tag other than 'all' to fail)
and #277 (tagmail report missing To: header). #292 was weird because the messages just didn't have the tags at all. The problem was that states didn't have tags, yet states were the source of nearly all messages. So, I added tags to the states, and included the state name in the tag list. Also, types were not including the type name in the tag list, so I added that. And, of course, a few unit tests to check it all. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1638 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/reports')
-rw-r--r--lib/puppet/reports/tagmail.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/reports/tagmail.rb b/lib/puppet/reports/tagmail.rb
index ba929b7fc..477246e0b 100644
--- a/lib/puppet/reports/tagmail.rb
+++ b/lib/puppet/reports/tagmail.rb
@@ -20,6 +20,8 @@ Puppet::Server::Report.newreport(:tagmail) do |report|
return
end
+ p report
+
# Load the config file
tags = {}
File.readlines(Puppet[:tagmap]).each do |line|
@@ -83,6 +85,7 @@ Puppet::Server::Report.newreport(:tagmail) do |report|
# We need to open a separate process for every set of email addresses
IO.popen(Puppet[:sendmail] + " " + emails.join(" "), "w") do |p|
p.puts "From: #{Puppet[:reportfrom]}"
+ p.puts "To: %s" % emails.join(', ')
p.puts "Subject: Puppet Report for %s" % report.host
p.puts messages
@@ -100,3 +103,5 @@ Puppet::Server::Report.newreport(:tagmail) do |report|
end
end
end
+
+# $Id$