5

Facts and Functions

This chapter will cover facts. We will show you how the Facter tool gathers them to show the profile of systems, how to interact with Facter, and how to use them in Puppet code. We will also cover how custom and external facts can be added to the provided core facts, to allow for more user-specific facts to be gathered.

Then, we will cover functions. We will explain what functions do and the three types of functions – statement, prefix, and chained. We will examine a selection of the core provided functions to show you their capabilities. A selection of functions will also be shown from the stdlib module, where we will explain the module’s approach and uses.

Deferred functions, which were introduced in Puppet 6, will also ...

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.