I did not announce the 0.10.2 version, which was mainly a bug fixing release and the first time I bothered to fix the dependencies of the language-puppet package. This version is full of new stuff however, you can get it on hackage or as binaries.
Hiera support, with facts manipulation utilities
This is the main attraction to this release. I did not use Hiera beforehand, so the development only started because of a GitHub issue. It turns out that this is really a great feature ! Most Hiera features should be supported (actually, I think all of them are, but I might have missed something). Facts manipulation is also easier now.
You can now have that kind of sessions :
1 2 3 4 5 6
New stateWriter monad
I previously blogged about a replacement for the standard RWS monad, wrote a package, and moved to it. Code speed increased by 10% on a single run, but I expect subsequent runs to go twice as fast. I will need to benchmark this of course, but this is currently not a priority.
JSON output, for use with puppet apply
This is a funny feature. There is support for this in
puppetresources, with the
--json flag. Once this is generated,
you can copy the file onto a machine and apply it with
puppet apply --catalog. This also means that it is now trivial
to write a replacement for the puppetmaster, a feature that was experimental before the
full rewrite, but that might be fully supported (with debian
Full scope tracking for all resources
Now all resources are stored with the full ‘scope’ (think of it as some kind of stack trace, including the originating host for exported resources), which makes debugging much easier. A typical use case is resource duplication in a define, such as the following case situation :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
The Puppet error messages is :
1 2 3
The language-puppet error message is :
This error message is way more informative :
- The resources are fully displayed, including all attribute values, which might shed some light on the problem.
- The originating host (
a.b.c) is displayed. This is crucial for debugging exported resource collisions. The standard output also shows
There are also a few minor changes in this release :
- Support for the
$classesvariable in templates : this one is just as limited as the official one, as its value is parse-order dependent.
- Support for
@instancevariables in templates.
- Support for
scope['key']syntax in templates.
- The haddocks were updated for some modules.
is_virtualfact, and stdlib functions (