I am completely stumped on this one..
I have a module like:
class test (
$file,
$list,
){
file { $file:
ensure => 'file',
content => epp('module/list.epp', {'list' => $list}),
mode => '0644',
owner => '0',
group => '0',
}
}
$list and $file are coming in from hiera. $file is a string that is set and $list is a deep merged array.
Basically I want to handle the file's contents based on the list parameter. However not every server is going to get data. For those that do it works fine, for those that do not I am getting an error saying the parameter $list is expecting a value.
Ok fine, How about...
class test (
$file,
$list = [''],
){
No dice, it won't take empty strings either...
How can I do the following:
1. create the file on **every** server (even if blank)
2. have the file be empty for servers without data
3. get the data across for servers with data.
1. create the file on **every** server (even if blank)
2. have the file be empty for servers without data
3. get the data across for servers with data.