summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@rimspace.net>2011-08-16 09:53:46 -0700
committerDaniel Pittman <daniel@rimspace.net>2011-08-16 09:53:46 -0700
commitb3e7f7b14111b75fbce01ce2bab5adf0fa333882 (patch)
tree32c9aedd6b462eac021fa54dbe535c27b86c8430
parent1ce2973e8af2300aff2b042257d8181855cf887d (diff)
parentb52fbf4e3c8cac2956c8a0d301f91d8eb081f994 (diff)
downloadpuppet-b3e7f7b14111b75fbce01ce2bab5adf0fa333882.tar.gz
puppet-b3e7f7b14111b75fbce01ce2bab5adf0fa333882.tar.xz
puppet-b3e7f7b14111b75fbce01ce2bab5adf0fa333882.zip
Merge pull request #39 from nfagerlund/ticket/2.7.x/8612_exec_creates_parameter
Ticket/2.7.x/8612 exec creates parameter
-rwxr-xr-xlib/puppet/type/exec.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb
index 3ba488f19..35e0c96d7 100755
--- a/lib/puppet/type/exec.rb
+++ b/lib/puppet/type/exec.rb
@@ -311,17 +311,20 @@ module Puppet
end
newcheck(:creates, :parent => Puppet::Parameter::Path) do
- desc "A file that this command creates. If this
+ desc <<-EOT
+ A file that this command creates. If this
parameter is provided, then the command will only be run
- if the specified file does not exist:
+ if the specified file does not exist.
- exec { \"tar xf /my/tar/file.tar\":
- cwd => \"/var/tmp\",
- creates => \"/var/tmp/myfile\",
- path => [\"/usr/bin\", \"/usr/sbin\"]
+ exec { "tar -xf /Volumes/nfs02/important.tar":
+ cwd => "/var/tmp",
+ creates => "/var/tmp/myfile",
+ path => ["/usr/bin", "/usr/sbin"]
}
- "
+ In this example, if `/var/tmp/myfile` is ever deleted, the exec
+ will bring it back by re-extracting the tarball.
+ EOT
accept_arrays