summaryrefslogtreecommitdiff
path: root/puppet/modules/try/manifests
diff options
context:
space:
mode:
authormicah <micah@leap.se>2013-05-23 18:45:34 +0200
committermicah <micah@leap.se>2013-05-23 18:45:34 +0200
commit7959f69b8c3006553cda22e482f96eb44e9304c6 (patch)
tree4d4d318a4001bffacf24d484f0e658985c005bff /puppet/modules/try/manifests
parentb6f13776c45b826b42bb1297f2df8fac8cdad893 (diff)
parent79d5bba4674185b9db06f40b4976ce447bfb2f38 (diff)
Merge branch 'issue/1690' of /home/git/repositories/micah/leap_platform into develop
Diffstat (limited to 'puppet/modules/try/manifests')
-rw-r--r--puppet/modules/try/manifests/file.pp13
1 files changed, 12 insertions, 1 deletions
diff --git a/puppet/modules/try/manifests/file.pp b/puppet/modules/try/manifests/file.pp
index 406c0b7a..47a8c269 100644
--- a/puppet/modules/try/manifests/file.pp
+++ b/puppet/modules/try/manifests/file.pp
@@ -18,7 +18,10 @@ define try::file (
file { "$name":
ensure => $ensure,
target => $target,
- require => Exec["check_${name}"],
+ require => $require ? {
+ undef => Exec["check_${name}"],
+ default => [ $require, Exec["check_${name}"] ]
+ },
loglevel => info;
}
}
@@ -37,6 +40,10 @@ define try::file (
exec { "restore_${name}":
command => $command,
cwd => $file_dirname,
+ require => $require ? {
+ undef => undef,
+ default => [ $require ]
+ },
loglevel => info;
}
} else {
@@ -44,6 +51,10 @@ define try::file (
unless => "/usr/bin/test -e '${target}'",
command => $command,
cwd => $file_dirname,
+ require => $require ? {
+ undef => undef,
+ default => [ $require ]
+ },
loglevel => info;
}
}