Book Image

Extending Puppet

By : Alessandro Franceschi
Book Image

Extending Puppet

By: Alessandro Franceschi

Overview of this book

Table of Contents (21 chapters)
Extending Puppet
Credits
Foreword
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

The parameters dilemma


In modules, we typically set up applications. Most of the time, this is done by installing packages, configuring files, and managing services.

We can write a module that does exactly what we need for our working scenario, or we can try to design it keeping in mind people with different needs and infrastructures who may use it.

These people might be us in the future when we'll have to manage a Puppet setup for another project or cope with different kinds of servers or manage unexpected or nonstandard requirements. While facing these new challenges, we might regret not having written our code in an abstract enough and reusable way.

Parameters are our APIs to the module's functionality; their values affect the module's behavior and how users can adapt it to fulfill their needs.

Hypothetically, we could enforce exactly what we need inside our code and forgo the need to have any parameter. Maybe, our code could be simpler to use and read in the beginning, but this would be...