aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/subversion/manifests/init.pp9
-rw-r--r--modules/subversion/templates/hook_sendmail.pl13
2 files changed, 22 insertions, 0 deletions
diff --git a/modules/subversion/manifests/init.pp b/modules/subversion/manifests/init.pp
index f1f6616e..3b7542e1 100644
--- a/modules/subversion/manifests/init.pp
+++ b/modules/subversion/manifests/init.pp
@@ -83,6 +83,15 @@ class subversion {
mode => 755,
}
+ if $commit_mail {
+ file { "$name/hooks/post-commit.d/send_mail":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 755,
+ content => template("subversion/hook_sendmail.pl")
+ }
+ }
}
diff --git a/modules/subversion/templates/hook_sendmail.pl b/modules/subversion/templates/hook_sendmail.pl
new file mode 100644
index 00000000..2444510b
--- /dev/null
+++ b/modules/subversion/templates/hook_sendmail.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -MSVN::Notify::Config=$0
+--- #YAML:1.0
+
+'':
+ PATH: "/usr/bin:/usr/local/bin"
+ handler: Alternative
+ alternative: HTML::ColorDiff
+ with-diff: 1
+ to:
+<% commit_mail.each do |mail| %>
+ - <%= mail %>
+<% end %>
+ from: root@<%= domain %>