Hi,

you want to use file resource defaults for code de-deplucation.
resource defaults are references and the resource type starts with a capital 
letter.

You want:

File {
   ensure => 'file',
   owner => ....,
   ...
}

Please always use ensure => file and not ensure => present.
The first one is more clear.

hth,

Martin


On 02 Jul 2014, at 17:05, Paolo Supino <[email protected]> wrote:

> Hi 
> 
> I'm trying to follow the process described in the link: 
> http://www.puppetcookbook.com/posts/remove-duplicated-file-resource-attributes.html
>  in a Puppet 2.7.x (x == 23 or 25) to try and reduce carpal tunnel 
> syndrome... ;-) 
> 
> but when I run puppet I get the following error: "err: Could not parse for 
> environment production: All resource specifications require names; expected 
> '%s' at init.pp:13" ...
> 
> Line 13 is the closing curly brace for the block (numbers on the left are the 
> line numbers as they appear in the editor): 
> 
>   8   file {
>   9     ensure  => 'present',
>  10     owner   => 'jboss',
>  11     group   => 'jboss',
>  12     mode    => '0775',
>  13   }
> 
> Can this be done with Puppet 2.7.x (I don't know for what version puppet 
> cookbook was written (the original one)
> 
> 
> 
> 
> 
> 
> 
> 
> TIA,
> Paolo 
> 
> 
> 
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/CA%2BB25By4_KvX5s61N8G%3D3qLsH_3ZApYGSgbpkKP3f5qD2qe9ag%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/429F03C9-9F64-48B3-A308-74718C277777%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to