On 09/14/2012 03:09 PM, jcbollinger wrote:
>
>
> On Friday, September 14, 2012 6:14:37 AM UTC-5, badamowicz wrote:
>
>     The other questions from all of you and finally Den's question, which
>     was: "Are you trying to set any permissions inside that directory
>     elsewhere in the manifest?" made me rethink everything and pointed
>     me to the right place. A few lines down from where I thought the
>     error was I used to have this:
>
>               file { [
>     "${codebase_ng::repository_mount}/${sonatype_work_dir}/nexus",
>     "${codebase_ng::repository_mount}/${sonatype_work_dir}/nexus/conf"]:
>                   require =>
>     File["${codebase_ng::repository_mount}/${sonatype_work_dir}"],
>                   ensure  => directory,
>                   owner   => $nexus_user_id,
>                   group   => $nexus_group_id,
>                   mode    => 0750,
>                   source  => "puppet:///modules/codebase_ng/nexus/conf",
>                   recurse => true,
>                   purge   => false,
>               }
>
>     This file resource was just about having configuration files in
>     place below '/repository/sonatype-work/nexus/conf'. But obviously
>     the first entry in the file array which resolves to
>     '/repository/sonatype-work/nexus' was the trigger for Puppet to
>     start recursive scanning everything.
>
>     So, the misconfiguration was on my side (nice pitfall), but I wonder
>     if this is expected behaviour. Shouldn't recursion only be done on
>     the last entry of the file array?
>
>
>
> No.  Why would you suppose that?  When you write a resource declaration
> of the form
>
> someresource { [ 'title1', 'title2']:
>    param1 => value1,
>    param2 => value2
> }
>
> it is shorthand for separate resource declarations, one for each title
> given, all having the specified parameters:
>
> someresource { 'title1':
>    param1 => value1,
>    param2 => value2
> }
>
> someresource { 'title2':
>    param1 => value1,
>    param2 => value2
> }
>
> The use of an array to specify multiple titles is perhaps a bit quirky
> in itself (though useful!), but I don't see why anyone would suppose
> that resources specified that way would be assigned different parameters
> from each other.
>
> There is nothing specific to the File resource type here, but even if
> there were, why would you expect Puppet to suppose that you only wanted
> recursion on one of the specified resources?  I don't see it.
>
>
> John
>

Yes, you're right. My idea was to have the 'source=>' parameter only 
applied to the last entry in the array. This was simply an error in 
reasoning.

Thanks
Bernd

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to