-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Puppet 8 for DevOps Engineers
By :

As discussed in Chapter 1, Puppet code is stored in manifest files ending with .pp
. It is possible to just write resources into a single manifest file and then, using the apply
command, puppet apply example.pp
, enforce the code locally. It can also be done without the manifest file using the execute
flag with the Puppet code in the field of the command, such as puppet apply -e 'Package { '
vscode': }'
.
Note
puppet apply
can also be run against a directory of manifests and it will parse every file in order, descending a directory structure. In Chapter 11, node definitions will allow us to utilize this.
While both of these approaches are useful for testing and learning purposes, they have a clear limitation in terms of lacking any structure, which will result in both having to run a lot of large static commands or files and having no way to pass data. Classes are named sections of code that provide this structure, offering a way...