Installing and testing Puppet on Debian 7

Installing and configuring Puppet on Debian isn’t very different than in Ubuntu as they are practically the same platform. Here is my notes from testing Puppet on Debian.

Installing Puppet client

Installing the client is easy and can be installed straight from apt:

sudo apt-get update
sudo apt-get install puppet

(And yes, I have sudo installed on my Debian test box for convenience.)

First Puppet test program

When the installation is ready, you should test Puppet to make sure it is working. This can be done with a simple one line puppet program in terminal (Thanks to Tero for this nifty example):

puppet apply -e 'file { "/tmp/helloPuppet": content => "This is a Puppet example!\n" }'

If everything is working, you should see notice-line in the terminal window saying that the “content is defined as md5” etc.

If you try to run the same line again, you will only get response “Finished catalog run in x.xx seconds” as the file has not changed:


What if we change the content of the command? Let’s test it:

puppet apply -e 'file { "/tmp/helloPuppet": content => "This is a modified Puppet example!\n" }'

As we can see, Puppet detects that the file /tmp/helloPuppet has different content than what we told it in the command above and will update the file. When we run the same command again, it detects that the file does not differ from the content on our command and will not update it:



– Introduction on Puppet at Linux Centralized Management course (Tero Karvinen) – – Tero Karvinen: Hello Puppet revisited – on Ubuntu 12.04 –