summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-10-02 14:24:43 +0200
committermh <mh@immerda.ch>2010-10-02 14:24:43 +0200
commita863cadc10448179941f0be1b8c3e56f25c8afa3 (patch)
treed46e352db576426027fee3377216ae3befc8671b
parentb604693d32eed5d0172578b6db6d442a197bc373 (diff)
enable possibility to only requirements for the clone
-rw-r--r--manifests/clone.pp12
1 files changed, 12 insertions, 0 deletions
diff --git a/manifests/clone.pp b/manifests/clone.pp
index 4025648..29f0b2b 100644
--- a/manifests/clone.pp
+++ b/manifests/clone.pp
@@ -1,11 +1,18 @@
# submodules: Whether we should initialize and update
# submodules as well
# Default: false
+# clone_before: before which resources a cloning should
+# happen. This is releveant in combination
+# with submodules as the exec of submodules
+# requires the `cwd` and you might get a
+# dependency cycle if you manage $projectroot
+# somewhere else.
define git::clone(
$ensure = present,
$git_repo,
$projectroot,
$submodules = false,
+ $clone_before = 'absent',
$cloneddir_user='root',
$cloneddir_group='0',
$cloneddir_restrict_mode=true
@@ -24,6 +31,11 @@ define git::clone(
user => root,
notify => Exec["git-clone-chown_${name}"],
}
+ if $clone_before != 'absent' {
+ Exec["git-clone_${name}"]{
+ before => $clone_before,
+ }
+ }
if $submodules {
exec{"git-submodules_${name}":
command => "git submodule init && git submodule update",