aboutsummaryrefslogtreecommitdiffstats
path: root/modules/subversion
diff options
context:
space:
mode:
Diffstat (limited to 'modules/subversion')
-rw-r--r--modules/subversion/manifests/hook.pp2
-rw-r--r--modules/subversion/manifests/init.pp16
-rw-r--r--modules/subversion/manifests/mirror_repository.pp8
-rw-r--r--modules/subversion/manifests/pre_commit_link.pp2
-rw-r--r--modules/subversion/manifests/repository.pp52
-rw-r--r--modules/subversion/manifests/snapshot.pp8
-rw-r--r--modules/subversion/templates/xinetd1
7 files changed, 43 insertions, 46 deletions
diff --git a/modules/subversion/manifests/hook.pp b/modules/subversion/manifests/hook.pp
index 08b626ad..a29ae22d 100644
--- a/modules/subversion/manifests/hook.pp
+++ b/modules/subversion/manifests/hook.pp
@@ -2,7 +2,7 @@ define subversion::hook($content, $type) {
$array = split($name,'\|')
$repo = $array[0]
$script = $array[1]
- file { "$repo/hooks/$type.d/$script":
+ file { "${repo}/hooks/${type}.d/${script}":
content => $content,
mode => '0755',
}
diff --git a/modules/subversion/manifests/init.pp b/modules/subversion/manifests/init.pp
index d09144c9..9f009b5e 100644
--- a/modules/subversion/manifests/init.pp
+++ b/modules/subversion/manifests/init.pp
@@ -20,7 +20,7 @@ class subversion {
package { ['perl-SVN-Notify-Config', 'perl-SVN-Notify-Mirror']: }
$local_dir = '/usr/local/share/subversion/'
- $local_dirs = ["$local_dir/pre-commit.d", "$local_dir/post-commit.d"]
+ $local_dirs = ["${local_dir}/pre-commit.d", "${local_dir}/post-commit.d"]
file { [$local_dir,$local_dirs]:
ensure => directory,
}
@@ -30,32 +30,32 @@ class subversion {
content => template('subversion/create_svn_repo.sh')
}
- file { "$local_dir/pre-commit.d/no_binary":
+ file { "${local_dir}/pre-commit.d/no_binary":
mode => '0755',
content => template('subversion/no_binary')
}
- file { "$local_dir/pre-commit.d/no_root_commit":
+ file { "${local_dir}/pre-commit.d/no_root_commit":
mode => '0755',
content => template('subversion/no_root_commit')
}
- file { "$local_dir/pre-commit.d/no_empty_message":
+ file { "${local_dir}/pre-commit.d/no_empty_message":
mode => '0755',
content => template('subversion/no_empty_message')
}
- file { "$local_dir/pre-commit.d/single_word_commit":
+ file { "${local_dir}/pre-commit.d/single_word_commit":
mode => '0755',
content => template('subversion/single_word_commit')
}
- file { "$local_dir/pre-revprop-change":
+ file { "${local_dir}/pre-revprop-change":
mode => '0755',
content => template('subversion/pre-revprop-change')
}
- file { "$local_dir/pre-commit.d/converted_to_git":
+ file { "${local_dir}/pre-commit.d/converted_to_git":
mode => '0755',
content => template('subversion/converted_to_git')
}
@@ -70,7 +70,7 @@ class subversion {
# - openldap , like named
define syntax_check($regexp_ext,$check_cmd) {
- file { "${subversion::server::local_dir}/pre-commit.d/$name":
+ file { "${subversion::server::local_dir}/pre-commit.d/${name}":
mode => '0755',
content => template('subversion/syntax_check.sh')
}
diff --git a/modules/subversion/manifests/mirror_repository.pp b/modules/subversion/manifests/mirror_repository.pp
index cf41ea63..1e0fabd3 100644
--- a/modules/subversion/manifests/mirror_repository.pp
+++ b/modules/subversion/manifests/mirror_repository.pp
@@ -2,14 +2,14 @@ define subversion::mirror_repository( $source,
$refresh = '*/5') {
include subversion::mirror
- exec { "/usr/local/bin/create_svn_mirror.sh $name $source":
+ exec { "/usr/local/bin/create_svn_mirror.sh ${name} ${source}":
creates => $name,
require => Package['subversion-tools']
}
- cron { "update $name":
- command => "/usr/bin/svnsync synchronize -q file://$name",
+ cron { "update ${name}":
+ command => "/usr/bin/svnsync synchronize -q file://${name}",
minute => $refresh,
- require => Exec["/usr/local/bin/create_svn_mirror.sh $name $source"],
+ require => Exec["/usr/local/bin/create_svn_mirror.sh ${name} ${source}"],
}
}
diff --git a/modules/subversion/manifests/pre_commit_link.pp b/modules/subversion/manifests/pre_commit_link.pp
index a9b543a7..fa3c2b2c 100644
--- a/modules/subversion/manifests/pre_commit_link.pp
+++ b/modules/subversion/manifests/pre_commit_link.pp
@@ -2,7 +2,7 @@ define subversion::pre_commit_link() {
$scriptname = regsubst($name,'^.*/', '')
file { $name:
ensure => 'link',
- target => "/usr/local/share/subversion/pre-commit.d/$scriptname",
+ target => "/usr/local/share/subversion/pre-commit.d/${scriptname}",
mode => '0755',
}
}
diff --git a/modules/subversion/manifests/repository.pp b/modules/subversion/manifests/repository.pp
index 92d2e43c..f7dbaba2 100644
--- a/modules/subversion/manifests/repository.pp
+++ b/modules/subversion/manifests/repository.pp
@@ -5,7 +5,7 @@
# irker_conf : hash containing irker config values. See man irkerhook
# for possible values in irker.conf.
# irkerhook_path : path to irkerhook.py script
-# no_binary : do not accept files with common binary extensions
+# no_binary : do not accept files with common binary extensions
# on this repository
# restricted_to_user : restrict commits to select user
# syntax_check : array of pre-commit script with syntax check to add
@@ -30,105 +30,103 @@ define subversion::repository($group = 'svn',
# TODO set umask -> requires puppet 2.7.0
# unfortunatly, umask is required
# http://projects.puppetlabs.com/issues/4424
- exec { "/usr/local/bin/create_svn_repo.sh $name":
+ exec { "/usr/local/bin/create_svn_repo.sh ${name}":
user => 'root',
group => $group,
- creates => "$name/hooks",
+ creates => "${name}/hooks",
require => Package['subversion-tools'],
}
file { $name:
+ ensure => directory
group => $group,
owner => 'root',
mode => $public ? {
true => 644,
false => 640,
},
- ensure => directory
}
- file { ["$name/hooks/pre-commit","$name/hooks/post-commit"]:
+ file { ["${name}/hooks/pre-commit","${name}/hooks/post-commit"]:
mode => '0755',
content => template('subversion/hook_commit.sh'),
- require => Exec["/usr/local/bin/create_svn_repo.sh $name"],
+ require => Exec["/usr/local/bin/create_svn_repo.sh ${name}"],
}
- file { ["$name/hooks/post-commit.d", "$name/hooks/pre-commit.d"]:
+ file { ["${name}/hooks/post-commit.d", "${name}/hooks/pre-commit.d"]:
ensure => directory,
- require => File["$name/hooks/pre-commit"],
+ require => File["${name}/hooks/pre-commit"],
}
- file { "$name/hooks/pre-revprop-change":
+ file { "${name}/hooks/pre-revprop-change":
ensure => "$subversion::server::local_dir/pre-revprop-change",
mode => '0755',
- require => File["$name/hooks/pre-commit"],
+ require => File["${name}/hooks/pre-commit"],
}
if $restricted_to_user {
- subversion::hook::pre_commit { "$name|restricted_to_user":
+ subversion::hook::pre_commit { "${name}|restricted_to_user":
content => template('subversion/restricted_to_user'),
}
} else {
- file { "$name/hooks/pre-commit.d/restricted_to_user":
+ file { "${name}/hooks/pre-commit.d/restricted_to_user":
ensure => absent,
}
}
if $commit_mail {
- subversion::hook::post_commit { "$name|send_mail":
+ subversion::hook::post_commit { "${name}|send_mail":
content => template('subversion/hook_sendmail.pl'),
require => Package['perl-SVN-Notify-Config'],
}
} else {
- file { "$name/hooks/post-commit.d/send_mail":
+ file { "${name}/hooks/post-commit.d/send_mail":
ensure => absent,
}
}
if $irker_conf {
- subversion::hook::post_commit { "$name|irker":
+ subversion::hook::post_commit { "${name}|irker":
content => template('subversion/hook_irker'),
}
- file { "$name/irker.conf":
+ file { "${name}/irker.conf":
content => template('subversion/irker.conf'),
}
} else {
- file { "$name/hooks/post-commit.d/irker":
+ file { "${name}/hooks/post-commit.d/irker":
ensure => absent,
}
}
if $no_binary {
- pre_commit_link { "$name/hooks/pre-commit.d/no_binary": }
+ pre_commit_link { "${name}/hooks/pre-commit.d/no_binary": }
} else {
- file { "$name/hooks/pre-commit.d/no_binary":
+ file { "${name}/hooks/pre-commit.d/no_binary":
ensure => absent,
}
}
if $extract_dir {
- subversion::hook::post_commit {"$name|extract_dir":
+ subversion::hook::post_commit {"${name}|extract_dir":
content => template('subversion/hook_extract.pl'),
require => [Package['perl-SVN-Notify-Mirror']],
}
} else {
- file { "$name/hooks/post-commit.d/extract_dir":
+ file { "${name}/hooks/post-commit.d/extract_dir":
ensure => absent,
}
}
- pre_commit_link { "$name/hooks/pre-commit.d/no_empty_message": }
+ pre_commit_link { "${name}/hooks/pre-commit.d/no_empty_message": }
- pre_commit_link { "$name/hooks/pre-commit.d/no_root_commit": }
+ pre_commit_link { "${name}/hooks/pre-commit.d/no_root_commit": }
- pre_commit_link { "$name/hooks/pre-commit.d/converted_to_git": }
+ pre_commit_link { "${name}/hooks/pre-commit.d/converted_to_git": }
if $syntax_check {
- $syntax_check_array = regsubst($syntax_check,'^',"$name/hooks/pre-commit.d/")
+ $syntax_check_array = regsubst($syntax_check,'^',"${name}/hooks/pre-commit.d/")
pre_commit_link { $syntax_check_array: }
}
}
-
-
diff --git a/modules/subversion/manifests/snapshot.pp b/modules/subversion/manifests/snapshot.pp
index 179f1ef1..00e66dde 100644
--- a/modules/subversion/manifests/snapshot.pp
+++ b/modules/subversion/manifests/snapshot.pp
@@ -4,18 +4,18 @@ define subversion::snapshot($source,
include subversion::client
- exec { "/usr/bin/svn co $source $name":
+ exec { "/usr/bin/svn co ${source} ${name}":
creates => $name,
user => $user,
require => Package['subversion'],
}
if ($refresh != '0') {
- cron { "update $name":
- command => "cd $name && /usr/bin/svn update -q",
+ cron { "update ${name}":
+ command => "cd ${name} && /usr/bin/svn update -q",
user => $user,
minute => $refresh,
- require => Exec["/usr/bin/svn co $source $name"],
+ require => Exec["/usr/bin/svn co ${source} ${name}"],
}
}
}
diff --git a/modules/subversion/templates/xinetd b/modules/subversion/templates/xinetd
index 87827ec2..0919ae60 100644
--- a/modules/subversion/templates/xinetd
+++ b/modules/subversion/templates/xinetd
@@ -12,4 +12,3 @@ service svnserve
server_args = -i -r <%= svn_base_path %>
flags = IPv6
}
-