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 puppetdbquery module


By now, we have realized how comprehensive the amount of information stored on PuppetDB is, as it provides a complete view of all our nodes' facts, catalogs, and reports. This is useful for a review of what happens on our infrastructure and for the metrics we can extract via queries on all the resources managed by Puppet, but this is not enough.

One of historical Puppet's limitations is the fact that a node basically has knowledge only about itself via its catalog and can interact with other nodes only via exported resources.

This is going to change. With Eric Dalén's puppetdbquery module we can access all PuppetDB data, and use it from different places:

  • On the CLI, with a new a Puppet face

  • In our manifests, with dedicated functions

  • On Hiera, with a dedicated backend

We can install it from the Forge:

puppet module install dalen-puppetdbquery

Query format

The puppetdbquery module uses a custom format for queries. This format is different (and easier to use) from the native...