Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (29.3k points)

Here is my naive approach:

# puppet/init.pp

$x = 'hello ' + 

     'goodbye'

This does not work. How does one concatenate strings in Puppet?

1 Answer

0 votes
by (50.2k points)
edited by

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.

Browse Categories

...