How do you concatenate strings in a Puppet .pp file?

后端 未结 6 1132
醉话见心
醉话见心 2021-02-03 17:27

Here is my naive approach:

# puppet/init.pp
$x = \'hello \' + 
     \'goodbye\'

This does not work. How does one concatenate strings i

6条回答
  •  名媛妹妹
    2021-02-03 18:10

    Keyword variable interpolation:

    $value = "${one}${two}"
    

    Source: http://docs.puppetlabs.com/puppet/4.3/reference/lang_variables.html#interpolation

    Note that although it might work without the curly braces, you should always use them.

提交回复
热议问题