diff options
author | Michael Scherer <misc@mageia.org> | 2012-01-15 16:24:50 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-01-15 16:24:50 +0000 |
commit | 25ad808e7ef9b0d1d1709d7976a247fc92a3138d (patch) | |
tree | ab09261f242c41f161ddf0007f8f92b8d968d2eb /modules | |
parent | 41676fe065b98a523e22d335137c130349dfb52a (diff) | |
download | puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.tar puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.tar.gz puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.tar.bz2 puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.tar.xz puppet-25ad808e7ef9b0d1d1709d7976a247fc92a3138d.zip |
add a subversion::hook class, to let us specify custom hook
Diffstat (limited to 'modules')
-rw-r--r-- | modules/subversion/manifests/hook.pp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/subversion/manifests/hook.pp b/modules/subversion/manifests/hook.pp new file mode 100644 index 00000000..c17b4a4c --- /dev/null +++ b/modules/subversion/manifests/hook.pp @@ -0,0 +1,26 @@ +class subversion { + class hook { + define post_commit($content) { + commit_hook { $name: + content => $content, + type => "postcommit", + } + } + define post_commit($content) { + commit_hook { $name: + content => $content, + type => "postcommit", + } + } + + define commit_hook($content, $type) { + $array = split($name,'\|') + $repos = shift($array) + $script = shift($array) + file { "$repo/hook/$type.d/$script": + content => $content, + mode => 755, + } + } + } +} |