On Sunday, April 14, 2013 10:55:07 AM UTC-5, Felix.Frank wrote:
>
> Hi, 
>
> On 04/04/2013 05:08 PM, jcbollinger wrote: 
> >     if I define a file resource without specifying an ensure parameter, 
> >     it seems to behave like ensure => present was specified. 
> > 
> > 
> > 
> > Yes, that's the default. 
>
> Uhm, are you sure? I would expect the following to be a noop, which 
> seems to be the case: 
>
>

Ah, my bad.  Most 'ensure' properties do default to 'present' 
(https://github.com/puppetlabs/puppet/blob/master/lib/puppet/property/ensure.rb),
 
but the File resource's is a special case, with no default value 
(https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/file/ensure.rb).
  
When file content is specified, however, whether via the 'content' property 
or the 'source' property, syncing the resource involves ensuring the file 
is present and has the specified content.  Thus, use of either of those 
properties effectively implies something similar to "ensure => 'file'".


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to