Book Image

Mastering Puppet - Second Edition

By : Thomas Uphill
Book Image

Mastering Puppet - Second Edition

By: Thomas Uphill

Overview of this book

Puppet is a configuration management system and a language. It was written for and by system administrators to manage large numbers of systems efficiently and prevent configuration drifts. Mastering Puppet deals with the issues faced when scaling out Puppet to handle large numbers of nodes. It will show you how to fit Puppet into your enterprise and allow many developers to work on your Puppet code simultaneously. In addition, you will learn to write custom facts and roll your own modules to solve problems. Next, popular options for performing reporting and orchestration tasks will be introduced in this book. Moving over to troubleshooting techniques, which will be very useful. The concepts presented are useful to any size organization. By the end of the book, you will know how to deal with problems of scale and exceptions in your code, automate workflows, and support multiple developers working simultaneously.
Table of Contents (17 chapters)

Resource tags


Resource tags are metaparameters available to all resources in Puppet. They are used in collecting only and do not affect the definition of resources.

Note

Metaparameters are part of how Puppet compiles the catalog and not part of the resource to which they are attached. Metaparameters include before, notify, require, and subscribe. More information on metaparameters is available at http://docs.puppetlabs.com/references/latest/metaparameter.html.

Any tags explicitly set on a resource will be appended to the array of tags. In our previous example, we saw the tags for our host entry in the PostgreSQL output as follows, but we didn't address what the tags meant:

{server,ldap,host,class,ldap::server,default,node,ldap-ldapserver1}

All these tags are defaults set by Puppet. To illustrate how tags are used, we can create multiple exported host entries with different tags. We'll start with adding a tag search to our Host collector in the base class as follows:

Host <<| tag == 'ldap...