Seems to work...
Thanks.
I got this:
file {
"${config['tomcat_home_dir']}/current":
ensure => "tomcat-${config['tomcat_version_server']}",
require => Package['ss-tomcat-server'];
}
Slightly cleaner than the inline template approach (which didn't work for
the name anyway).
Doug.
On Mon, Aug 8, 2011 at 2:25 PM, Stefan Schulte <
[email protected]> wrote:
> 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
>
--
Regards,
Douglas Garstang
http://www.linkedin.com/in/garstang
Email: [email protected]
Cell: +1-805-340-5627
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.