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
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/m7jCxW9yv2AJ.
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-users?hl=en.