Simple play icon Course
Skills Expanded

Puppet 4: Working with Files and Templates

by Andrew Mallett

In this course, you will learn how to refactor your Puppet code to make use of templates, reduce the required files for a module, as well as how you can deliver parts of files, files, or complete sub-directories with Puppet.

What you'll learn

There are many scenarios where adding functionality to your Puppet modules can make your work easier. In this course, Puppet 4: Working with Files and Templates, you'll learn how to make use of templates in your Puppet code and how you can deliver files with Puppet. First, you'll see how easily you can reduce the number of files a module requires by making use of variable data and templates. The original template language was Ruby, but now with Puppet 4 you can support both Ruby and Puppet templates. Next, you'll look at ways to deliver files and parts of files. Finally, you'll learn how you can deliver a complete folder structure if required, purging any unmanaged content using file-line while concat delivers single lines or fragments of files allowing for autonomous edits to the managed files. By the end of the course, you will be able to create Puppet modules delivering configurations using templates, as well as allowing autonomous edits using file fragments.

Table of contents

Course Overview
2mins

About the author

Andrew is an all around Linux professional with in depth knowledge of the OS and this is supported with scripting in bash, perl, python and ruby and application development in C, C++ and Java. Having worked for many years in training, Andrew has developed automated course build systems after endless time wasted on Friday nights. The first build system he built was aptly named "Friday nights." This has inspired his interest in all things deployment related. He has authored training courses on M... more

Ready to upskill? Get started