Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 838 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 838 Bytes

YAML-based Puppet ENC

This is a simple Puppet ENC (External Node Classifier) that classifies nodes based on regular expressions read from a YAML file.

Configuration File Format

The configuration file is a YAML dictionary where each key represents a host regular expression. If no match is found, attributes from the (optional) host DEFAULT is returned.

The following attributes are allowed by Puppet:

  • environment
  • classes
  • parameters

At least environment or classes must be defined.

Configuration Example

DEFAULT:
  classes: []

'^foo-dev-bar\d+\..+$':
  environment: develop
  parameters:  { guild: foo-dev }
  classes: [ 'roles::foo::bar' ]

'^foo-prod-bar\d+\..+$':
  environment: production
  parameters:  { guild: foo-prod }
  classes: [ 'roles::foo::bar' ]