summaryrefslogtreecommitdiff
path: root/puppet/modules/try/manifests
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-05-22 15:05:52 -0400
committerMicah Anderson <micah@riseup.net>2013-05-23 10:34:08 -0400
commit79d5bba4674185b9db06f40b4976ce447bfb2f38 (patch)
treea093986212c5c9bc51bb876d20966dc060b16490 /puppet/modules/try/manifests
parentaafeaecb26fbb05284558114332a89439261637b (diff)
pass any require => parameters that are in the try::file resource so dependencies can be satisfied
Change-Id: I10d3ebe6a3009ebe01e578ea582d00dc930689ed
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;
}
}