Good news everyone,
After about 4hrs of food, beer and code Ewoud Kohl van Wijngaarden (ekohl
on Github) and I are intoxicated to release puppetdb-stencil.
Puppetdb-stencil is designed to render resource types based on a template.
The canonical example of this is the nagios types in Puppet:
$ cd examples && python ../puppetdb-stencil.py nagios_host
nagios_hostgroup
define host {
host_name node1.example.com
hostgroups +mysql
use mysql
alias MySQL Cluster node node1.example.com
address node1.example.com
}
[..]
define hostgroup {
hostgroup_name mysql
alias MySQL Cluster 1
}
[..]
On a PuppetDB with 600+ machines and 900+ host groups generating the files
for these types takes about 1s in total.
Because of the templating this principle can be applied to any resource
available through PuppetDB as long as a template is created for that type.
Templating is done with the Jinja2 library allowing for inheritance and
many other advanced templating features.
This work has been inspired by the work done by eBay/Marktplaats and Github.
You can find puppetdb-stencil at:
https://github.com/daenney/puppetdb-stencil.
We expect to shortly add:
* packaging and availability through PyPi
* additional configuration switches to fully configure connecting to
PuppetDB
* allow for an arbitrary query to be passed in to the resource request
* allow to specify a file to which the output will be written instead of
stdout
* tests, Travis integration and the works
--
Daniele Sluijters
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/bcfd1735-42f5-40ca-8d33-959ebcd8e1cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.