On 6/21/2010 3:51 PM, Matt Keating wrote:
Not to hijack your thread, but I'm having a similar issue with trying
to pass an array to a define:
class solr {
$configFileList = ["admin-extra.html", "elevate.xml"]
define configFiles ( $solrIndex, $fileName ) {
file { "/var/solr/$solrIndex/conf/$fileName" :
if you call this like below, $fileName is an array, which puppet will
dutifully interpolate into your string, which is not what you want.
ensure => present,
owner => "tomcat",
source =>
"puppet://puppetmaster.dennisinteractive.co.uk/files/solr/conf/$fileName"
}
}
}
Then If I call it like so:
solr::configFiles { $title :
fileName => $configFileList,
solrIndex => $title,
require => File["/var/solr/$title/conf/xslt"],
}
It doesnt seem to pass the $configFileList through correctly. Any
idea's on what I should be doing?
The following would be one possibility:
define solr::config_file ($index) {
file { "/var/solr/${index}/conf/${name}":
# ...
}
}
solr::config_file {
$configFileList:
index => $title;
}
Best Regards, David
--
dasz.at OG Tel: +43 (0)664 2602670 Web: http://dasz.at
Klosterneuburg UID: ATU64260999
FB-Nr.: FN 309285 g FB-Gericht: LG Korneuburg
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.