From f7254c82c2526397fd02e8df01508e9c8541a285 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 19 Nov 2010 00:24:21 +0000 Subject: implement the commit mail part --- modules/subversion/manifests/init.pp | 9 +++++++++ modules/subversion/templates/hook_sendmail.pl | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 modules/subversion/templates/hook_sendmail.pl (limited to 'modules') 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 %> -- cgit v1.2.1