Chapter 4. Understanding Puppet resources

Perplexity is the beginning of knowledge.

—Khalil Gibran

We've already met three important types of Puppet resources: package, file, and service. In this chapter, we'll learn more about these, plus other important resource types for managing users, groups, SSH keys, cron jobs, and arbitrary commands.

Understanding Puppet resources

Files

We saw in Chapter 2, Creating your first manifests, that Puppet can manage files on a node using the file resource, and we looked at an example which sets the contents of a file to a particular string using the content attribute. Here it is again (file_hello.pp):

file { '/tmp/hello.txt': content => "hello, ...

Get Puppet 4.10 Beginner's Guide Second 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.