On Mon, Aug 08, 2011 at 11:19:36AM -0700, Douglas Garstang wrote: > I've got this: > > file { > '/opt/sugarsync/tomcat/tomcat-home/current': > ensure => "tomcat-$config['tomcat_version_server']"; > > where $config['tomcat_version_server'] was set with extlookup (the yaml > one), by loading: > > --- > tomcat_config: > tomcat_version_server: 6.0.20-1 > tomcat_version_libs: 1.0-1 > > Inside those double quotes, where variable interpolation is supposed to > occur, I'm actually getting: > > tomcat-tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server'] > > Not '6.0.20-1'. How can I interpolate a hash inside a string? Is this a bug? > > Doug. > IIRC it should read "tomcat-${config['tomcat_version_server']}" (notice the curling braces). Otherwise puppet will print the hash first (and concats all keys and values) and then just put ['tomcat_version_server'] after it.
Does the above suggestion work? -Stefan
pgpWcTdQLgzNq.pgp
Description: PGP signature