Skip to content
Device42 as ENC for puppet
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Device42 as Puppet ENC


A simple integration that allows you to set up and manage External Node Classification for Puppet using Device42.


As a single point of truth for your network, Device42 is a perfect candidate for providing External Node Classification for your Puppet infrastructure.

D42 as a Puppet ENC allows you to manage the classifications of all your Puppet nodes in one place.

Setup (basic, WIP):

  • Create a custom field for devices on D42 called "node_classes" that stores JSON. This field can be called whatever you like, but should be unique.

  • Fill in settings.yaml with values that match your setup, including the name of your custom field.

  • Run pip install -r requirements.txt

  • Put your node classification (as JSON) into the "node_classes" custom field on D42. Writing ENC from Puppetlabs

  • Switch your Puppet Master's configuration to use ENC

  • ex:

  ENC is configured in /etc/puppetlabs/puppet/puppet.conf
  	external_nodes = /home/puppetmaster/d42enc/
  	node_terminus = exec


Test the output of the ENC.

$ ./ --verbose
fetching node classification for:
d42 appliance host:
node_classes_field is set to: node_classes
  environment: production
  - 0
  - 1
  - 2
  - 3
    parameters: work

Note: do not use --verbose when ENC is actually in use. Output needs to be only YAML containing the node classification

Content of node_classes on device named on D42:

  "classes": {
    "common": null,
    "example": {
      "parameters": "work"
    "listexample": [0,1,2,3],
    "environment": "production"

Upcoming Features / TODO

You can’t perform that action at this time.