Ask Your Question

What do you want to see in Beginning Puppet?

asked 2014-01-18 21:34:37 -0600

nibalizer gravatar image

Myself, William Van Hevelingen, and Daniele Sluijters are writing a new book for Apress called Beginning Puppet. We'd like to get feedback from the community on the content of the book. The topic of this book is to serve the Puppet newcommer. It will focus on writing manifests and modules to get stuff done with Puppet. We're leaving all configuration of Puppet masters and such out since we feel we addressed that material in Pro Puppet 2nd Ed, which we just published in December. We're excited to keep contributing to this awesome community.

A few questions to ... (more)

edit retag flag offensive close merge delete



I would like to see a good end-to-end example of role/profile framework as discussed by Craig Dunn. And what are best practices for managing code on the puppet master with git.

Red Cricket gravatar imageRed Cricket ( 2014-01-22 17:10:54 -0600 )edit

I am new to puppet, and attempting to deploy it at my company. I too would like that along with all the code involved. Exactly which file contains the code as well. E.G. Do you put all the roles in init.pp under module/roles/mantifests/, or do you separate them into diffrerent pp files?

RobN gravatar imageRobN ( 2014-06-04 12:00:02 -0600 )edit

7 Answers

Sort by ยป oldest newest most voted

answered 2014-02-07 04:36:58 -0600

updated 2014-02-07 04:39:33 -0600

These are the things I would have liked to see as soon as I started experimenting with Puppet (in no specific order - this is mainly a brain dump):

  • What's a catalogue and how Puppet builds it
  • Recommended file structure for Puppet manifests
  • How to divide your infrastructure in environments
  • A clear indication that Puppet doesn't guarantee an "order of execution", and how to define dependencies between resources and classes (i.e. the "arrow" syntax to ensure that a class is always applied before/after another one).
  • Before ever writing a module, how to test it (and as a ...
edit flag offensive delete link more



Similarly, point out that parameters in classes/defines have no set order of execution, so that they should not be inter-dependent.

robrwo gravatar imagerobrwo ( 2014-02-19 10:12:10 -0600 )edit

answered 2014-01-25 02:53:33 -0600

doc75 gravatar image

updated 2014-01-25 02:54:31 -0600

I would suggest to address the following topics:

  • best practice to create his own module
  • best practice to have independent and testable modules
  • best practices to efficiently test a module (rspec-puppet and others)
  • best practices to handle dependencies inside and outside of a module
  • managing module parameters through hiera

Hope this help.

edit flag offensive delete link more

answered 2014-01-24 04:06:01 -0600

mikek gravatar image

When starting with Puppet (two months ago) I could have used a frank discussion about class dependencies, the 'anchor' bug, class parameters and the danger of class inheritance. There's a huge amount of contradictory information out there.

While these are 'advanced' topics, they're all issues present in the PuppetLabs NTP module. NTP being possibly the simplest possible service one could configure, and the module being held up as "featured" and as a good example of how to write a Puppet module.

Maybe entitle the book "Beginning Puppet (again)", starting with a disclaimer ... (more)

edit flag offensive delete link more

answered 2014-01-23 23:07:08 -0600

AronR gravatar image

updated 2014-02-19 19:30:21 -0600

My own learning was very ad hoc, and having some systematic introduction to Puppet, similar to the following, would have been very welcome. Note that I'm suggesting starting out for some time, in this beginner's guide, with standalone, single-host configuration, and then making the leap to the master/agent configuration somewhere down the road, after the user has become more familiar with Puppet basics:

  • Some truly "hello world" examples: starting out with a minimal Puppet module: just a manifests directory with a single init.pp manifest, that installs an empty file in a system temporary directory.
  • And then ...
edit flag offensive delete link more


A suggestion, nothing more: it could also prove illuminating to start out, if you haven't already done so, by surveying existing Puppet books aimed at beginners, and identifying if ...(more)

AronR gravatar imageAronR ( 2014-01-23 23:15:10 -0600 )edit

Another area of confusion to me as a beginner: what environment is provided by Puppet to external commands invoked via 'exec' resources. John Bollinger's comment in this discussion proved ...(more)

AronR gravatar imageAronR ( 2014-02-06 20:34:03 -0600 )edit

answered 2014-05-25 15:23:42 -0600

zogman gravatar image

I want docs to ALWAYS make it clear which file the example code snippet belongs in, and what is the file's pathname.

Here's an example of a doc with missing pathname/context.

class { 'sudo': }
sudo::conf { 'web':
  source => 'puppet:///files/etc/sudoers.d/web',

The page: does not tell you what the actual, physical pathname on the puppet server is.

edit flag offensive delete link more

answered 2014-02-19 10:16:51 -0600

robrwo gravatar image
  • Best practices (as noted above).
  • Use of notify/subscribe and various techniques to avoid re-running Exec resources.
  • Use of concat
  • Use of having servers configure each other, e.g. nodes advertise they are clients of services using @@ resources.
  • Ways to get around duplicate resource definitions using virtual resources or the ensure_resource function.
  • stdlib
  • Writing custom facts.
  • Writing simple custom functions (and when it's good to writ custom functions).
  • Using hiera and hiera with eyaml.

Ok, some of these are advanced topics. But a brief mention of them to get users started.

edit flag offensive delete link more

answered 2014-01-25 20:20:08 -0600

spuder gravatar image

Which tips and tricks did you use when learning Puppet that were successful?

  • Installing an array of packages simultaneously
  • Not treating puppet like a bash script (forget ordering)
  • Use a case statement with operating system facts

What do you wish you'd been told earlier?

  • Look at the NextGen for parameterized classes

  • How to deploy a manifest to just one node and not the entire cluster!

  • idempotence, idempotence, idempotence

  • puppet forge

What do you show people when you are teaching them Puppet?

  • puppet resource foo (then change that users default login ...
edit flag offensive delete link more


Thanks for mentioning the *very* valuable Puppet CookBook here!

AronR gravatar imageAronR ( 2014-02-13 18:20:56 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-01-18 21:34:37 -0600

Seen: 863 times

Last updated: May 25 '14