7

Templating, Iterating, and Conditionals

This chapter will cover advanced structures for the Puppet language, including templates that enable the insertion of variables into templated files. The two formats available in Puppet, Embedded Ruby (ERB) templates, which are based on native Ruby templating, and Embedded Puppet (EPP) templates, which are modern Puppet language-based templates, will be discussed, highlighting the differences between the two and the core advantages of using EPP over ERB.

Additionally, the chapter will delve into the use of iteration and loops in Puppet, showing how iterative functions are used with sections of code known as lambdas in Puppet instead of more traditional loop keywords of other languages. Finally, the chapter ...

Get Puppet 8 for DevOps Engineers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.