Exploring the standard library
One of the oldest-established Puppet Forge modules is puppetlabs/stdlib
, the official Puppet standard library. We looked at this briefly earlier in the chapter when we used it as an example of installing a module with r10k
, but let's look more closely now and see what the standard library provides and where you might use it.
Rather than managing some specific software or file format, the standard library aims to provide a set of functions and resources which could be useful in any piece of Puppet code. Consequently, well-written Forge modules use the facilities of the standard library rather than implementing their own utility functions which do the same thing.
You should do the same in your own Puppet code: when you ...
Get Puppet 5 Beginner's Guide - Third Edition 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.