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

Introducing the future parser


The parser is the part of the Puppet code that interprets our manifests.

It has been rewritten from scratch and its new incarnation, nicknamed future parser, introduces many new features, which greatly enhance the power of the Puppet DSL.

The most relevant additions are:

  • Lambdas which are blocks of code that have parameters and can be passed directly to the new iteration functions

  • Powerful filtering and concatenation functions for data collection like hashes and arrays, also thanks to the new type system

The overall impression is that the whole set of innovations expected with Puppet 4 will allow better and more versatile management of data, which should ease the adoption of paradigms such as infrastructure as data, and maybe, radically change the way we write and compose our Puppet code.

For example, in future modules, we might face a wider and more dynamic usage of functions like create_resources or resource declarations based on iterations over data and see less...