Book Image

Mastering Puppet

By : Thomas Uphill
Book Image

Mastering Puppet

By: Thomas Uphill

Overview of this book

Table of Contents (17 chapters)

Organizing the nodes with ENC


An ENC is a script that is run on the Puppet master, or the host compiling the catalog, to determine which classes are applied to the node. The ENC script can be written in any language, and it receives as a command-line argument certname (certificate name) from the node. In most cases, this will be the Fully Qualified Domain Name (FQDN) of the node; we will assume that the certname setting has not been explicitly set and that the FQDN of our nodes is being used.

Tip

We will only use the hostname portion as the FQDN can be unreliable in some instances. Across your enterprise, the naming convention of the host should not allow for multiple machines to have the same hostname. The FQDN is determined by a fact; this fact is the union of the hostname fact and the domain fact. The domain fact on Linux is determined by running the command hostname -f. If DNS is not configured correctly or reverse records do not exist, the domain fact will not be set and the FQDN will...