Book Image

Puppet 4.10 Beginner's Guide - Second Edition

By : John Arundel
Book Image

Puppet 4.10 Beginner's Guide - Second Edition

By: John Arundel

Overview of this book

Puppet 4.10 Beginner’s Guide, Second Edition, gets you up and running with the very latest features of Puppet 4.10, including Docker containers, Hiera data, and Amazon AWS cloud orchestration. Go from beginner to confident Puppet user with a series of clear, practical examples to help you manage every aspect of your server setup. Whether you’re a developer, a system administrator, or you are simply curious about Puppet, you’ll learn Puppet skills that you can put into practice right away. With practical steps giving you the key concepts you need, this book teaches you how to install packages and config files, create users, set up scheduled jobs, provision cloud instances, build containers, and so much more. Every example in this book deals with something real and practical that you’re likely to need in your work, and you’ll see the complete Puppet code that makes it happen, along with step-by-step instructions for what to type and what output you’ll see. All the examples are available in a GitHub repo for you to download and adapt for your own server setup.
Table of Contents (20 chapters)
Puppet 4.10 Beginner's Guide Second Edition
About the Author
About the Reviewer
Customer Feedback

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 can 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 need a particular piece of functionality, check the standard library first to see if it solves your problem, rather than implementing it yourself.

Safely installing packages with ensure_packages

As you know, you can install a package using the package...