aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-01-14 02:40:26 +0000
committerMichael Scherer <misc@mageia.org>2011-01-14 02:40:26 +0000
commit479d25acf474a6b8ce8459345adfb11b0cc51556 (patch)
treefd5f2ce86be03d3b75decc98b0b676401771e560 /modules/git
parent16a4b6128009eae1394f48cc73190a1bc32396c4 (diff)
downloadpuppet-479d25acf474a6b8ce8459345adfb11b0cc51556.tar
puppet-479d25acf474a6b8ce8459345adfb11b0cc51556.tar.gz
puppet-479d25acf474a6b8ce8459345adfb11b0cc51556.tar.bz2
puppet-479d25acf474a6b8ce8459345adfb11b0cc51556.tar.xz
puppet-479d25acf474a6b8ce8459345adfb11b0cc51556.zip
- add a git module prototype
Diffstat (limited to 'modules/git')
-rw-r--r--modules/git/manifests/init.pp54
1 files changed, 54 insertions, 0 deletions
diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp
new file mode 100644
index 00000000..a11ea9fc
--- /dev/null
+++ b/modules/git/manifests/init.pp
@@ -0,0 +1,54 @@
+class git {
+ class common {
+ package { 'git-core':
+ }
+ }
+
+ class server inherits common {
+ # TODO
+ # integration with xinetd for anonymous co
+ # creation of /git
+ # define common syntax check, see svn
+ # proper policy : no-fast-forward
+ # no branch ?
+ # no binary
+ # no big file
+ # no empty commit message, no root
+ # automated push to another git repo ( see http://noone.org/blog/English/Computer/VCS/Thoughts%20on%20Gitorious%20and%20GitHub%20plus%20a%20useful%20git%20hook.futile
+ #
+ # how do we handle commit permission ?
+ }
+
+ define repository {
+ # TODO
+
+ }
+
+ class client inherits common {
+
+
+ }
+
+ define snapshot($source, $refresh ='*/5', $user = 'root') {
+ include git::client
+ #TODO
+ # should handle branch -> clone -n + branch + checkout
+ # create a script
+ # Idealy, should be handled by vcsrepo https://github.com/bruce/puppet-vcsrepo
+ # once it is merged in puppet
+ exec { "/usr/bin/git clone $source $name":
+ creates => $name,
+ user => $user
+ }
+
+ cron { "update $name":
+ # FIXME no -q ?
+ command => "cd $name && /usr/bin/git pull",
+ user => $user,
+ minute => $refresh
+ }
+ }
+}
+
+
+