O'Reilly logo

Puppet Essentials by Felix Frank

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making classes more flexible through inheritance

When you walked through the basic implementation of the Cacti module in the previous chapter, you probably noticed that the class is the backbone of any manifest. You add classes to your manifests for almost any new feature that you want to support. The class concept is pervasive and central to the majority of manifest designs. There is no alternative to relying on classes in the manifest development.

For all this, the class might lack some flexibility. A class will either just behave in a fixed way, or it will accept parameters for (practically unlimited) customization. The limitations of class parameterization have been discussed in Chapter 4, Modularizing Manifests with Classes and Defined Types ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required