Book Image

Troubleshooting Puppet

By : Thomas Uphill
Book Image

Troubleshooting Puppet

By: Thomas Uphill

Overview of this book

Table of Contents (14 chapters)

External node classifiers – ENCs


ENCs are used to assign classes, parameters, and an environment to nodes. The output of an ENC must either be valid YAML or nothing. The simplest type of ENC is a script that is written using the exec node terminus, which executes the script that is pointed to by the external_nodes setting in puppet.conf.

When using the exec terminus, the exit code of the script should be zero, unless there is a problem executing the script.

When Puppet is configured to use an ENC, the output of the ENC is merged with the output from your site.pp file. This can be a problem when you are debugging. After a successful catalog compile and agent run, the classes.txt file will contain a list of all the classes that were applied to the node. The problem is that you may find it hard to determine whether the classes were found in site.pp or returned by the ENC.

ENCs can be written in any language. The only restriction on an ENC is that it accepts the hostname of a node as the first...