From 269f2116b74d370d26e352699c0652b9cbdc996c Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Thu, 22 Mar 2012 10:47:04 +0000 Subject: split more file --- modules/git/manifests/client.pp | 1 + modules/git/manifests/init.pp | 28 ---------------------------- modules/git/manifests/snapshot.pp | 22 ++++++++++++++++++++++ modules/git/manifests/svn.pp | 3 +++ 4 files changed, 26 insertions(+), 28 deletions(-) create mode 100644 modules/git/manifests/client.pp create mode 100644 modules/git/manifests/snapshot.pp create mode 100644 modules/git/manifests/svn.pp (limited to 'modules') 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': } +} -- cgit v1.2.1