aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2012-03-22 10:47:04 +0000
committerMichael Scherer <misc@mageia.org>2012-03-22 10:47:04 +0000
commit269f2116b74d370d26e352699c0652b9cbdc996c (patch)
tree98bbb510981611976f990ecb1aa1633fd34a5b82 /modules
parentf049ee75ff91cea6959ed0aa84fdb1e227e72076 (diff)
downloadpuppet-269f2116b74d370d26e352699c0652b9cbdc996c.tar
puppet-269f2116b74d370d26e352699c0652b9cbdc996c.tar.gz
puppet-269f2116b74d370d26e352699c0652b9cbdc996c.tar.bz2
puppet-269f2116b74d370d26e352699c0652b9cbdc996c.tar.xz
puppet-269f2116b74d370d26e352699c0652b9cbdc996c.zip
split more file
Diffstat (limited to 'modules')
-rw-r--r--modules/git/manifests/client.pp1
-rw-r--r--modules/git/manifests/init.pp28
-rw-r--r--modules/git/manifests/snapshot.pp22
-rw-r--r--modules/git/manifests/svn.pp3
4 files changed, 26 insertions, 28 deletions
diff --git a/modules/git/manifests/client.pp b/modules/git/manifests/client.pp
new file mode 100644
index 00000000..c1b96fe0
--- /dev/null
+++ b/modules/git/manifests/client.pp
@@ -0,0 +1 @@
+class git::client inherits git::common { }
diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp
index 32d1060b..46760af3 100644
--- a/modules/git/manifests/init.pp
+++ b/modules/git/manifests/init.pp
@@ -35,32 +35,4 @@ class git {
}
}
- class client inherits common {
-
-
- }
-
- class svn inherits client {
- package { 'git-svn': }
- }
-
- 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
- }
- }
}
diff --git a/modules/git/manifests/snapshot.pp b/modules/git/manifests/snapshot.pp
new file mode 100644
index 00000000..8b903700
--- /dev/null
+++ b/modules/git/manifests/snapshot.pp
@@ -0,0 +1,22 @@
+define git::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
+ }
+}
diff --git a/modules/git/manifests/svn.pp b/modules/git/manifests/svn.pp
new file mode 100644
index 00000000..d1b53919
--- /dev/null
+++ b/modules/git/manifests/svn.pp
@@ -0,0 +1,3 @@
+class git::svn inherits git::client {
+ package { 'git-svn': }
+}