aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-11-19 00:24:17 +0000
committerMichael Scherer <misc@mageia.org>2010-11-19 00:24:17 +0000
commit86c852973bc6f65d0e37dac483a3852d98b15eff (patch)
tree1435ca41d0a0d8587d973886bf42dffe5c52b5c1 /modules
parenta633966827f68bf3d87a76a7902077699d0e1bed (diff)
downloadpuppet-86c852973bc6f65d0e37dac483a3852d98b15eff.tar
puppet-86c852973bc6f65d0e37dac483a3852d98b15eff.tar.gz
puppet-86c852973bc6f65d0e37dac483a3852d98b15eff.tar.bz2
puppet-86c852973bc6f65d0e37dac483a3852d98b15eff.tar.xz
puppet-86c852973bc6f65d0e37dac483a3852d98b15eff.zip
set the server visibility
Diffstat (limited to 'modules')
-rw-r--r--modules/subversion/manifests/init.pp37
1 files changed, 25 insertions, 12 deletions
diff --git a/modules/subversion/manifests/init.pp b/modules/subversion/manifests/init.pp
index 499b504b..edeb254e 100644
--- a/modules/subversion/manifests/init.pp
+++ b/modules/subversion/manifests/init.pp
@@ -38,19 +38,32 @@ class subversion {
# - puppet
# - perl/ php syntax
- define repository ($group = "svn" ) {
-# # $name ==> lieu du checkout
-# exec { "svnadmin create $name":
-# path => "/usr/bin:/usr/sbin:/bin",
-# creates => $name
-# }
+
+ define repository ($group = "svn",
+ $public = true) {
+ # faire un script qui mets les permissions comme il faut
+ # http://svnbook.red-bean.com/nightly/fr/svn.serverconfig.multimethod.html
+ # $name ==> lieu du checkout
+
+ # TODO set umask -> requires puppet 2.7.0
+ exec { "svnadmin create $name":
+ user => root,
+ group => $group,
+ creates => $name
+ }
# # TODO complete documentation
-# file { "$name":
-# mode => 660
-# recurse => true
-# }
-# un hook par defaut qui fait un for i en pre, un hook par defaut qui fait un post
- }
+#
+ file { "$name":
+ group => $group,
+ user => root,
+ mode => $public ? {
+ true => 644,
+ false => 640
+ },
+ ensure => directory
+ }
+
+ }
class client {