Vlados Vladosov
2013-Mar-17 00:54 UTC
[Puppet Users] Convert single quoted string to double quoted for interpolation
Please help, how convert single quoted string to double quoted for interpolation: $conf = ''${domain}xxxx/${hostgroup}yyyyyy/${fqdn}zzz/ZendOptimizerPlus.ini'' Thanks. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Vlados Vladosov
2013-Mar-17 10:18 UTC
[Puppet Users] Re: Convert single quoted string to double quoted for interpolation
I found solution: --- environment: development classes: php: source_dir: "${domain}" init.pp class php ( $source_dir = params_lookup( ''source_dir'' ), ) { $conf = regsubst($php::source_dir, ''\$\{'', ''#{'', ''G'') $conf1 = inline_template("<%= %Q($php::conf) %>" notify{"test $php::conf1":} } output: Notice: test fabrik.test Notice: /Stage[main]/Php/Notify[test fabrik.test]/message: defined ''message'' as ''test fabrik.test'' Notice: Finished catalog run in 0.82 seconds воскресенье, 17 марта 2013 г., 4:54:09 UTC+4 пользователь Vlados Vladosov написал:> > Please help, how convert single quoted string to double quoted for > interpolation: > > $conf = ''${domain}xxxx/${hostgroup}yyyyyy/${fqdn}zzz/ZendOptimizerPlus.ini'' > > > Thanks. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.