Re: [Puppet Users] Re: Merge folders

2011-05-23 Thread Jeremy Kindy
On Mon, Apr 4, 2011 at 12:13 PM, Marcus Downing wrote: > As I said, the "sourceselect => all" parameter is necessary to make puppet > merge the listed sources rather than selecting one of them. > I take your point that variables are a fragile way of specifying. I'll try > refactoring it based on c

Re: [Puppet Users] Re: Merge folders

2011-04-05 Thread Felix Frank
Hi, On 04/04/2011 06:13 PM, Marcus Downing wrote: > As I said, the "sourceselect => all" parameter is necessary to make > puppet merge the listed sources rather than selecting one of them. ah, thanks for pointing that out again. I completely missed that (nor knew of its existence). > I take your

Re: [Puppet Users] Re: Merge folders

2011-04-04 Thread Marcus Downing
As I said, the "sourceselect => all" parameter is necessary to make puppet merge the listed sources rather than selecting one of them. I take your point that variables are a fragile way of specifying. I'll try refactoring it based on class parameters, but the list of sources isn't the same leng

Re: [Puppet Users] Re: Merge folders

2011-04-04 Thread Felix Frank
Hi, On 04/04/2011 12:14 PM, Marcus Downing wrote: > Correction: this only works if the place that uses the variable (the > 'file' resource) comes after the place where the variable is modified. > In our case that meant the child looks like this: > > class child { > $sources += [ '/pat

[Puppet Users] Re: Merge folders

2011-04-04 Thread Marcus Downing
Correction: this only works if the place that uses the variable (the 'file' resource) comes after the place where the variable is modified. In our case that meant the child looks like this: class child { $sources += [ '/path/to/second' ] include parent } -- You received this message be

[Puppet Users] Re: Merge folders

2011-04-04 Thread Marcus Downing
Ah, it works if the variable is in the outer scope: $sources = [ '/path/to/first' ] class parent { file { '...': ensure => directory, source => $sources, sourceselect => all } } class child { $sources += [ '/path/to/second' ] } -- You received this message b

[Puppet Users] Re: Merge folders

2011-04-04 Thread Marcus Downing
I'm trying to do this using an array variable and the sourceselect parameter. class parent { $sources = [ '/path/to/first' ] file { '...': ensure => directory, source => $sources, sourceselect => all } } class child { $sources += [ '/path/to/second' ] }