What are Puppet Manifests and Puppet Structure

What are Puppet Manifests and Puppet Structure

In this tutorial you will know all about Puppet manifests and the main Puppet structure.

What are Manifests ?

Manifests are files with extension *.pp which have instructions or resources to be checked, installed or modified, resources can be packages, services or files.

What are Resources ?

Resources can be packages, executable, services, files, users or any other instructions to be made as part of automation manifest script.

For example you can write a manifest which will install apache in one server and yet create users and change some permissions for some files.

What are Classes

Classes is a way of organizing, you can group some of the code in a class and save it in a module which can be called later in a manifest.

Manifests Simple Examples


Install a Package

package {'httpd':
ensure => present,

Create a Specific File Called mike

file {'mike':
path => '/home/mike/mike'

Start a Service

service {'httpd':
ensure => running,
enable => true,

In above examples the resources are "service, package and file"


Puppet Tips

You don't need to remember all the resources instead you can use simple commands to list all resources and another to see examples for each resource.

List All Resources

puppet describe --list

Check Resource Manual

puppet describe file

puppet describe service



Subscribe to
for video tutorials updates