kirei / puppet-yaml-enc

YAML-based Puppet ENC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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' ]

About

YAML-based Puppet ENC

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 96.6%Language:Makefile 3.4%