Hi Bernardo,

On 12.11.2012, at 20:00, Bernardo Costa wrote:

> I am using puppet-2.6.17 from a centos 5.x box and after reading the 
> documentation (http://docs.puppetlabs.com/references/2.6.17/type.html#file) I 
> feel the need of using the sourceselect parameter set to all for 
> copying/concatenating contents from multiple files to a single one. But it 
> miserably fails on this issue. Below is an example of configuration I have 
> tried without success. The idea is to create a base class for common contents 
> of an automount map and also two specialized classes for particular mount 
> points of each node. I believe with "sourceselect => all" it would be 
> possible but I couldn't see it working. Any ideas of why ...?
> 
> File {
>     ensure => file,
>     group  => "root",
>     owner => "root",
>     mode  => "0644",
> }
> 
> class automount {
>     file { "/var/tmp/auto.direct": 
>         source => "puppet:///files/automount/basic.conf",
>         sourceselect => "all",
>     }   
> }
>  
> class automount::itchy inherits automount {
>     File['/var/tmp/auto.direct'] { 
>         source => [ "puppet:///files/automount/itchy.conf", 
> "puppet:///files/automount/basic.conf" ],
>         sourceselect => "all",
>     }   
> }
> 
you want to add the new sources in the inherited classes?

e.g. in automount::itchy

source +> ["puppet:///files/automount/itchy.conf", 
"puppet:///files/automount/basic.conf"],

Sidenote:
when using modules the source has another syntax:

puppet:///modules/<modulename>/<filename>

you can omit the "files" path

HTH

Martin


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to