Issue #8612 has been updated by Nan Liu.

Status changed from Unreviewed to Needs Decision
Assignee set to Nick Fagerlund

"A file that this command creates" is misleading, it simply checks whether the 
filepath exist, and it does not require the command create the file. Some other 
resource, or even some out of band process outside of puppet can create the 
file. 

<blockquote>
If the parameter create is provided, then the command will only be run if the 
specified filepath does not exist. In the example below, the tar command will 
execute and extract file.tar only if the path /var/tmp/myfile does not exist:
<pre>
exec { "tar xf /my/tar/file.tar":
  cwd     => "/var/tmp",
  creates => "/var/tmp/myfile",
  path    => ["/usr/bin", "/usr/sbin"]
}
</pre>
</blockquote>

I will leave this up to Nick, our document writer, to decide what's most 
appropriate.
----------------------------------------
Bug #8612: exec "creates" param in doc example wrong
https://projects.puppetlabs.com/issues/8612

Author: Jeff Blaine
Status: Needs Decision
Priority: Normal
Assignee: Nick Fagerlund
Category: documentation
Target version: 
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