Apress Access

Pro Puppet

By James Turnbull , Jeffrey McCune

  • eBook Price: $41.99
Buy eBook Buy Print Book
Puppet is a must-have tool for system administrators. Pro Puppet will teach you how to maximize Puppet's capabilities and customize it for your environment.

Full Description

  • Add to Wishlist
  • ISBN13: 978-1-4302-3057-1
  • 336 Pages
  • User Level: Intermediate to Advanced
  • Publication Date: May 3, 2011
  • Available eBook Formats: EPUB, MOBI, PDF

Related Titles

  • Go Recipes
  • Certified OpenStack Administrator Study Guide
  • Python Recipes Handbook
  • Beginning Elastic Stack
  • Beginning Hibernate, 4th Edition
  • Practical LPIC-1 Linux Certification Study Guide
  • Learn CakePHP, Second Edition
  • PHP Development Tool Essentials
  • Practical D3.js
  • Introducing Linux Distros
Full Description

Pro Puppet is an in-depth guide to installing, using, and developing the popular configuration management tool Puppet. The book is a comprehensive follow-up to the previous title Pulling Strings with Puppet. Puppet provides a way to automate everything from user management to server configuration. You'll learn how to create Puppet recipes, extend Puppet, and use Facter to gather configuration data from your servers.

Puppet is a must-have tool for system administrators, and Pro Puppet will teach you how to maximize its capabilities and customize it for your environment.

  • Install and configure Puppet to immediately start automating tasks and create reporting solutions
  • Learn insider tricks and techniques to better manage your infrastructure
  • Become a Puppet expert!

What you’ll learn

  • See how to install Puppet on a variety of platforms
  • Learn how to manage infrastructure with Puppet
  • Discover how to scale Puppet to suit small, medium, and large organizations
  • Learn how to integrate Puppet with other tools such as Cucumber and Nagios
  • Discover advanced Puppet techniques to make managing your environment easier
  • Learn how to develop and extend Puppet to suit your environment

Who this book is for

Systems administrators, implementers and systems integrators.

Table of Contents

Table of Contents

  1. Getting Started with Puppet
  2. Building Hosts with Puppet
  3. Working with Environments
  4. Puppet Scalability
  5. Externalizing Puppet Configuration
  6. Exporting and Storing Configuration
  7. Puppet Consoles: Dashboard and The Foreman
  8. Tools and Integration
  9. Reporting with Puppet
  10. Extending Facter and Puppet
  11. Marionette Collective
  12. Working with Puppet
Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.


If you think that you've found an error in this book, please let us know by emailing to editorial@apress.com . You will find any confirmed erratum below, so you can check if your concern has already been addressed.

On page 17:
The paragraph below "Tip" and above "Note" refers to "In Listing 1-1." However Listing 1-1 refers to a Puppet Resource instead of Puppet Client Connection to the Puppet Master.

On page 19:
Listing 1.3 has the following contents:
import 'nodes.pp'
$puppetserver = 'puppet.example.com'

The description of Listing 1.3 says:
"In Listing 1-3, we’ve created a variable that contains the fully qualified domain name of our Puppet
master, enclosed in double quotes."

Except that Listing 1.3 used single quotes, not double.

On page 21:

moduledir = /etc/puppet/modules:/var/lib/puppet/modules:/opt/modules

moduledir doesn't exist, the proper config item is modulepath as show on page 66.

On page 24:
The file path listed in the line :
puppet$ cp /etc/sudoers /etc/puppet/manifest/files/etc/sudoers

should read:

cp /etc/sudoers /etc/modules/sudo/files/etc/sudoers

On page 34:

The first example is missing a closing bracket.

On page 35 & 48:

The note points to an now invalid link, correct one now: http://docs.puppetlabs.com/guides/troubleshooting.html#common-misconceptions

On page 37:

Command to install git under Ubuntu is incorrectly named -- It does not correspond to the correct package.

Published in book as:
$ sudo apt-get install git

Should be:
$ sudo apt-get install git-core

On page 39:
Below listing 2.2:

"We've created three classes: ..."

should be:

"We've created four classes: ssh, ssh::install, ssh::config, and ssh::service.

On page 40, 41:
In two places, opening braces are missing.
Page 40:

class ssh
include ssh::install, ssh::config, ssh::service

should be

class ssh {
include ssh::install, ssh::config, ssh::service

Page 41:

package { "ssh":
name => $operatingsystem ?
/(Red Hat|CentOS|Fedora|Ubuntu|Debian)/ => "openssh-server",
Solaris => "openssh",
ensure => installed,

should be

package { "ssh":
name => $operatingsystem ? {
/(Red Hat|CentOS|Fedora|Ubuntu|Debian)/ => "openssh-server",
Solaris => "openssh",
ensure => installed,

On page 41:

"Red Hat" should be "RedHat" in the regular expression

On page 52:
class bind::server {
service {
hasstatus => true,
hasrestart => true,
enable => true,
class bind::server::enabled inherits bind::server {
Service["bind"] { ensure => running, enable => true }
class bind::server::disabled inherits bind::server {
Service["bind"] { ensure => stopped, enable => false }
Here, class bind::server is the parent class and defines a service that controls the bind service. It uses
the service resource type to enable the bind service at boot time and specify the service must be

That last word in the quote above is incorrect. The bind::server class clearly has "enable => true".

On page 55:
class mysql::service {
enabled => true

Should be enable => true

On page 60-61:
There seems to be some kind of error in the managing puppet with puppet section.

I keep getting an error like this, and I have copied the configurations exactly.

err: Could not retrieve catalog from remote server:
Error 400 on SERVER: Failed to parse template
puppet/puppet.conf.erb: Could not find value for
'puppetserver' at /etc/puppet/modules/puppet/manifests/config.pp:5

On the puppet IRC channel I was advised that I would probably need to use something like scope.lookupvar('puppet::params::puppetserver') in the template.

On page 67:

Development Lifecycle link (in note) is incorrect.

Should be .../wiki/Development_Lifecycle

On page 76:

This page of the book tells us to create a directory and copy the 'sudoers' file to it. The lines for the commands look like this:

puppet$ mkdir –p /etc/puppet/modules/sudo/files/etc
puppet$ cp /etc/sudoers /etc/puppet/manifests/files/etc/sudoers

Notice we create the directory in /etc/puppet/modules/sudo, but then copy the file to /etc/puppet/manifiests. Where should the file really go?

On page 100:

On pages 98 and 99 you talk about moving the existing puppetmaster to port 8141 but on page 100 you configure the load balancer for port 18141

On page 143:

At the bottom of the page you talk about Listing 6-10 when in reality you mean 6-9.

On page 170:
Typo or unclear in the book
The URL example is not a good one as it is not what would be the default based on the setup.

reporturl = http://dashboard.example.com:80/reports
The URL that will work with the standard setup as presented earlier is:
reporturl = http://dashboard.example.com:3000/reports

On page 242:

To do this, enable options in the [main] section of the Puppet master's puppet.conf

should be

To do this, enable options in the [main] section of both the Puppet master's and Puppet client puppet.conf

On page 245:

export RUBYLIB=

should be


On page 270:

content='[ {rabbit_stomp, [{tcp_listeners, [6163]} ]} ].'
should be
content='[ {rabbitmq_stomp, [{tcp_listeners, [6163]} ]} ].'

at least for a rabbitmq version 2.5.1 without this change the port used is the default 61613


    1. Android Best Practices


      View Book

    2. Expert Shell Scripting


      View Book

    3. Automation through Chef Opscode


      View Book

    4. Linux Kernel Networking


      View Book