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.
31k questions
32.8k answers
501 comments
693 users