Issue #8612 has been updated by Nick Fagerlund.

Status changed from Re-opened to Merged - Pending Release
Target version set to 3.0.2

Okay, sounds like there's definitely still a problem here. Let's try this 
again. Revised text: 

    A file to look for before running the command. The command will
    only run if the file **doesn't exist.**

    This parameter doesn't cause Puppet to create a file; it is only
    useful if **the command itself** creates a file.

        exec { "tar -xf /Volumes/nfs02/important.tar":
          cwd     => "/var/tmp",
          creates => "/var/tmp/myfile",
          path    => ["/usr/bin", "/usr/sbin"]
        }

    In this example, `myfile` is assumed to be a file inside
    `important.tar`. If it is ever deleted, the exec will bring it
    back by re-extracting the tarball. If `important.tar` does **not**
    actually contain `myfile`, the exec will keep running every time
    Puppet runs.


----------------------------------------
Bug #8612: exec "creates" param in doc example wrong
https://projects.puppetlabs.com/issues/8612#change-75772

Author: Jeff Blaine
Status: Merged - Pending Release
Priority: Normal
Assignee: Nick Fagerlund
Category: documentation
Target version: 3.0.2
Affected Puppet version: 
Keywords: 
Branch: 


The 'creates' param in the code seems wrong, but I'm a newb, so...

http://docs.puppetlabs.com/references/stable/type.html#exec

...

***creates***

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:
<pre>
    exec { "tar xf /my/tar/file.tar":
      cwd => "/var/tmp",
      creates => "/var/tmp/myfile",
      path => ["/usr/bin", "/usr/sbin"]
    }
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to