Skip to Content
Learning Puppet 4
book

Learning Puppet 4

by Jo Rhett
April 2016
Intermediate to advanced
594 pages
12h 53m
English
O'Reilly Media, Inc.
Content preview from Learning Puppet 4

Chapter 8. Upgrading from Puppet 3

The upgraded parser used in Puppet 4 makes several changes to the Puppet language, and deprecates some unused or replaced features. This chapter covers changes from Puppet 3.

If you are new to Puppet, you can safely skip this chapter for now. Refer back to it if you must update someone else’s older Puppet code.

Replacing Deprecated Features

There are features that were necessary in the Puppet 2 days that have been deprecated in Puppet 3 and are completely gone from Puppet 4. All of these have been known for years, so there should be no surprises here.

The following pages include the deprecations and how to replace them.

Junking the Ruby DSL

Puppet 2.6 introduced the Ruby DSL to allow Puppet resources to be declare in pure Ruby. This was intended to allow Ruby developers to utilize Ruby control features, such as iteration, that weren’t available in the Puppet configuration language at the time.

Tip
As the Ruby DSL really never worked well, you are very unlikely to find this in use anywhere.

The Ruby DSL was very limited in what could be expressed. There was a development attempt to make it more powerful, but the result was unstable and likely to hang the Puppet process. As the limited Ruby subset didn’t provide significant functionality, Puppet Labs instead added iteration to the Puppet language.

The Ruby DSL was deprecated in Puppet 3, and has been completely removed in Puppet 4.

Upgrade Action

Search for manifests that have the .rb extension ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro Puppet, Second Edition

Pro Puppet, Second Edition

Spencer Krum, William Van Hevelingen, Ben Kero, James Turnbull, Jeffery McCune
Mastering Puppet 5

Mastering Puppet 5

Ryan Russell-Yates, Jason Southgate

Publisher Resources

ISBN: 9781491907993Purchase bookErrata Page