Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
/ easyenc Public archive

A simple ENC for Puppet, fed by a yaml "database".

Notifications You must be signed in to change notification settings

mld/easyenc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easyenc

A simple ENC and compiler for Puppet, fed by a yaml "database". Please keep in mind that this is still a work in progress.

Requires python and python-yaml packages in Ubuntu 12.04. YMMV.

easyenc.py

A simple ENC (External Node Classifier) for Puppet, fed by a yaml "database".

In your puppet master configuration, enter something along the lines of this to use:

[master]
  node_terminus = exec
  external_nodes = /usr/local/bin/easyenc.py /var/lib/puppet/easyenc.yaml

/var/lib/puppet/easyenc.yaml:

---
default:
  environment: unknown
  class: roles::unknown
test.example.com:
  environment: dev
  class: roles::dev::test
another.example.com:
  class: roles::some::role

easyenc-compiler.py

Compilation of easyenc.yaml from a directory of yaml files. somename.yaml gives environment "somename" for all hosts listed in that file. default.yaml is special...

/etc/easyenc.d/default.yaml:

---
environment: unknown

/etc/easyenc.d/prod.yaml:

---
an.example.com: roles::some::role
another.example.com: roles::prod::web
$ easyenc-compiler.py /etc/easyenc.d
---
an.example.com: 
  environment: prod
  class: roles::some::role
another.example.com: 
  environment: prod
  class: roles::prod::web
default:
  environment: unknown

About

A simple ENC for Puppet, fed by a yaml "database".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages