> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Try without the dollar sign:
file {
'/opt/sugarsync/tomcat/tomcat-home/current':
ensure => inline_template("tomcat-<%=
config['tomcat_version_server'] %>");
}
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
$f = inline_template("<%= config['tomcat_home_dir'] -%>/current")
$v = inline_template("tomcat-<%= config['tomcat_version_server'] %>")
file {
"${f}":
ensure => "${v}",
}
Or similar.
--
vagn
> How can I interpolate a hash inside a string?
Like this:
"tomcat-${config['tomcat_version_server']}"
The curly braces groups things so the parser knows that the
variable expression to expand doesn't end after the "g" in
"config".
I'm not sure where this is documented, though. I can't find
it after a quick look in the language guide, where I had
expected it to be.
/Bellman
Does the above suggestion work?
-Stefan