Chapter 5. Puppet Facts, Functions, and Templates

In this chapter, we will learn more advanced details of Puppet such as:

  • Puppet facts
  • Puppet templates
  • Puppet functions

If you are familiar with programming languages, this chapter will be much easier to follow. Puppet uses Ruby as the coding language. We will not dive deep into the coding aspect and will use only enough coding to solve our problems. So, even if you do not have any coding experience, it will not be too hard to follow.

Puppet facts

Facts are structured data about the system that we can use anywhere in our manifests. They are imported to the Puppet parser as top scope variables. To display the facts of a host, we can use the facter command. We can write the command as follows to display ...

Get Learning Puppet for Windows Server 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.