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
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
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
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' ]
}
We'd like to make the contents of a folder contain all the files from two
different folders on the server. Which folder to merge will be different for
different client machines. How can I specify that in a file rule?
--
You received this message because you are subscribed to the Google Groups