FAQ
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.

Search Discussions

  • Vlados Vladosov at Mar 17, 2013 at 10:18 am
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMar 17, '13 at 12:54a
activeMar 17, '13 at 10:18a
posts2
users1
websitepuppetlabs.com

1 user in discussion

Vlados Vladosov: 2 posts

People

Translate

site design / logo © 2022 Grokbase