O'Reilly logo

Puppet Essentials by Felix Frank

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Examining the most notable resource types

To complete our tour of the basic elements of a manifest, let's take a closer look at the resource types you have already used and some of the more important ones that you have not yet encountered.

You probably already have a good feeling for the file type, which will ensure the existence of files and directories, along with their permissions. Pulling a file from a repository (usually, a Puppet module) is also a frequent use case, using the source parameter. For very short files, it is more economic to include the desired content right in the manifest:

file { 
    '/etc/modules': 
        content => "# Managed by Puppet!\n\ndrbd\n", 
}

Tip

The double quotes allow expansion of escape sequences such as \n.

Another useful capability ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required