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.
Tip
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:
{default,node,server,ldap,host,ldap-node2,ldap::server,class}
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-server...