Idempotence -- not just a big & scary word

You may have read some docs, or stopped by the #puppet IRC channel. You've likely read a blog post or two. You've probably run across the word idempotence or have been chastised for writing non-idempotent Puppet code with exec resources. But what exactly does that mean? Here's a definition that you might see in a calculus class.



Environment Leakage

Welcome back; gather 'round. Today we're going to talk about a topic we've all been wondering how to bring up. We'll be talking about leakage--no, not that kind of leakage! (Those of you too young to get that joke are highly encouraged to not go look up the history of Olestra.)

Update: In many cases, environments no longer leak on Puppet 4.8 and above.

Oh, the fun things we can write!

boring text

So now we've used Puppet to manage a file on our computer. The /etc/motd file is now owned by root and has a fun little sentence in it. We can write all we want out to that file. But sooner or later, we're going to want to put something a little more interesting. Perhaps we'll want the hostname or operating system installed?

We'll take a little side trip first, though, and learn about $variables.

So what is this Puppet thing anyway?

Puppet Zero

So you keep hearing about this Puppet thing and how it's going to solve all of your DevOpsy configuration management problems. But what is it? How do you write a Puppet script? Well, as it turns out, the key concept is unlearning the habit of thinking about scripts. But all in good time. We'll get there. First, let's write some code.

Let's start out with something easy. You all know what the /etc/motd file is. It's the message of the day file that's dumped to your screen every time you log in.