Back
Here is my naive approach:
# puppet/init.pp$x = 'hello ' + 'goodbye'
# puppet/init.pp
$x = 'hello ' +
'goodbye'
This does not work. How does one concatenate strings in Puppet?
For this, you could use Keyword variable interpolation:
$value = "${one}${two}"
Reference: http://docs.puppetlabs.com/puppet/4.3/reference/lang_variables.html#interpolation
Note: Although it might work without the curly braces, you should always use them.
30.9k questions
32.9k answers
500 comments
665 users