parent
0d23510c6b
commit
f4d623b933
@ -1,46 +0,0 @@
|
|||||||
From e8c0c799e6f648a90028ce2248e14247f021f1c7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kelsey Hightower <kelsey.hightower@gmail.com>
|
|
||||||
Date: Wed, 24 Aug 2011 21:51:45 -0400
|
|
||||||
Subject: [PATCH/puppet] (#9167) Do not sent tagmail reports if no changes
|
|
||||||
|
|
||||||
Prevent Puppet Master from sending tagmail reports if the status of the
|
|
||||||
puppet run is "unchanged".
|
|
||||||
---
|
|
||||||
lib/puppet/reports/tagmail.rb | 6 ++++++
|
|
||||||
spec/unit/reports/tagmail_spec.rb | 5 +++++
|
|
||||||
2 files changed, 11 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
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
|
|
||||||
--
|
|
||||||
1.7.6
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v1.4.11 (Darwin)
|
|
||||||
|
|
||||||
iQIcBAABAgAGBQJPhdnRAAoJEBBUt6JL1uwwgXcP/3uzzgN1OA2NVGMlSkeeMMx1
|
|
||||||
D3V+oZxYt3IBilFKPgJLD4a0bOOFsLYOTdBWx1iHftIUpEktCY5ROIH3rOpJ3SJ8
|
|
||||||
TckV3QxyDpCKD0OUuAu67WtQA5cDSdpOwo7K/w0OzPI8IqSFWjzQ8PYdXb807S6G
|
|
||||||
pMLXCkGvwi73nBZlAFy2ZE9AQRapDzkWNpIlpu2X0rEz84s3eKkOVBYM8sjs4Y3D
|
|
||||||
pbiAyFJEE4jcEvov76JBj+2r8CLsH+j18PxisR0RfnFK5DF4Ajbmbg2zk+A7n2Zc
|
|
||||||
qTy5kpmuj2O2a/TDMFq84U1HgdqRVunf9L4zS4/inUUjQN6uIs7dH8oKC04uKwsE
|
|
||||||
Db8JGISryukCGkSTD99ojc8nFgpsn8PfJrgKzUR/mp02mcb3so/6VtC8jREHraSH
|
|
||||||
taBVhNJI5Zvep7mmQxLgUnoaEwUEzDBVeL8HbML31gFbd7WemnQN8j5IH8e/qqS+
|
|
||||||
SPxsT1sUauM/WcB7hWG0bklwLgQcns/nrVQ2zjzZr4Ln52WLw0bPZq/FzGwhaDvN
|
|
||||||
0lrr9hqR27gSkAyeyuodRvMHLgnk/PW82+SH92crqe/y4iIUBeonXFpo3y0Uf5Gz
|
|
||||||
4qwnxYMGNv6+tQhyC7todeOqw8BJKN0yf+DyxS1BD6uPDcBjgPk2BOmFuoYv/NtB
|
|
||||||
wZtwDKXdEUx/0jjhCexq
|
|
||||||
=32xz
|
|
||||||
-----END PGP SIGNATURE-----
|
|
@ -1,17 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v1.4.11 (Darwin)
|
|
||||||
|
|
||||||
iQIcBAABAgAGBQJPhJb0AAoJEBBUt6JL1uwwZDYP/jTEbdhzM5l1t2aUgdNdkk6d
|
|
||||||
otYWofbq4ClsUJfMP4giHUDtlzM5GJCqtMcDeIp8HfqsQNdDIL9BFCLyVCo7VukS
|
|
||||||
EE9VaNv8E5oOyAUAFR8wsETyPN5V7WH34o3XQ2Og1+7O6RSDXEGdWH8dkjioJ78C
|
|
||||||
HNVJvCOEdYKCGgZt6/aZUOvCXAHEolb5lcKeyQCLpK+dP5Bp/Hp/JbVqbhOmiMi2
|
|
||||||
yJm/eV/zlFQ9sz2JovFgAzaJwSDLEetx01ROsDrJks44LaH4ibEu+MoLOPTVIGkk
|
|
||||||
EJJRfojOKrEQIBco1zjvsx7D6gIe/WGlshT9s7bvNGCAmQvhxRoga2PvZwyhQxkE
|
|
||||||
kZbSiBprYW9Z0J2FTdSuLCH9dcAcqVzvtaEJpfgzRM5lkhnSKVaBdwRYOmtSxPP4
|
|
||||||
WyecLc1TZSkJklqc70kTq7pMFrrBkZrgufVlckXrA4ZKV8ZnP1KxPBQ/0lFseOHO
|
|
||||||
qnJV1tNgZUTRrFjPM58Va7TSD5tH5RlFci/k6v+0FowdDgko8J4vXr2XU0QTzPSK
|
|
||||||
CaR75g+jpyBk2XIkTdkQ/VR46imsMw6NEIkPuSbAo1O00BAStvJ4/7xvR+dZQ1nj
|
|
||||||
tYHO3naagP/rPRxbYZJek6lcKn9frQsx1Epev4VH1mi8NiHmc6aN4BvkxP0L0oUZ
|
|
||||||
mIfuFz6Kwagt5FSue1VL
|
|
||||||
=DjHL
|
|
||||||
-----END PGP SIGNATURE-----
|
|
@ -0,0 +1,18 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
|
||||||
|
Comment: GPGTools - http://gpgtools.org
|
||||||
|
|
||||||
|
iQIcBAABAgAGBQJP/JQ9AAoJEBBUt6JL1uwwko0P/igNdI01Lkss73TaRRSGiJcF
|
||||||
|
dLSSqyNjrgyiAoZkBTlyL7qPf76l5t7qhzO6cjj6q64e5yaGfZAbr65d4LhIGs7Z
|
||||||
|
fcpzC4MpRhcaZKTqp9864Fhwd0UC/rzMAMaR1bRkSLVgcR0F6WXDcoclnwcRZXb5
|
||||||
|
e6b51JI85G0lyQB95Gq0SIUZQ/n8OsMDC/IhLpJLCbZIw7jRB1hciFPL6SuMGFlK
|
||||||
|
Zw+3ZpMwWGOpLU0bxLL6Nw54vVwJDf1pq/Upi+EChPdkzJQw2rZR0qwDlavNd6Ax
|
||||||
|
mEBwFyBOQ/mEiIRZslQk/TYQ+xuq3eCSk11E3ZJ+VDx2h7T4mqdEdZRoYmwliGOW
|
||||||
|
EXR/+QmB7Jqmgi0Ue0Y1LYUsydHKvXYTeR8R/wmm4O3qD8CTQ0SxbsemO78o/dp0
|
||||||
|
pM++wMjoAKO5vyZ0/3k+kblIzXy+BYdzeqThZArMhV5q3iIm5daYSegyIA4RCSgG
|
||||||
|
mnyTGtaSQRQP685gwGdlF9P1kfrhnvw7UK2HW3WDsmkZh9lGlKSM3stwlB4FgXGu
|
||||||
|
9OAFFhRVh23Ka5B6CAXBqIdXvjz3LOmKKalxcRwR36UEaJZ4OIlTDMAmbXofOvHq
|
||||||
|
YbR0dWBovVMUn7N9vMC5AosOXApbQWNQINW2th21KV4lNvzc76bi3j5iTMsBKARE
|
||||||
|
qNhzL1TXuJYNPUv88UxJ
|
||||||
|
=mjJz
|
||||||
|
-----END PGP SIGNATURE-----
|
Loading…
Reference in new issue