Puppet Manifests: Now with MOAR Awesome

One of the things that may confuse new Puppet users is the seemingly random order in which manifest elements are executed. Long-time users are already accustomed to the relationship metaparameters that can be used to dictate the specific order (i.e.: before, notify, require, subscribe). However, community feedback indicated that a significant change in Puppet’s execution ordering was desired. Enter Manifest Order Analysis of Resources (aka MOAR)

Starting with Puppet version 3.3.0, users can now choose to implement MOAR by adding –ordering=manifest to your Puppet Agent CLI executions. You can also change the default behavior from title-hash to manifest in your configuration settings if you do not wish to include the CLI switch.

Now, in case you’re worried that the resource relationships in your existing manifests will be affected, don’t be alarmed: Puppet will give precedence to the order of execution that you specify in your manifests. Any resources that do not have their relationships explicitly defined will be executed in the order that they appear in the manifest.

What’s the big benefit? This new feature will encourage the development of manifests that are easier to read. This is beneficial whether you’re brand new to a team or revisiting manifests that you wrote years ago.  Also, MOAR will eventually be the default behavior in both open-source Puppet and Puppet Enterprise.  So, now’s the right time to start getting used to it (you will be able to implement older ordering algorithms if you so choose).  NOTE: Your OS distribution may have an older version than 3.3.0.  In that case, you can download the binaries or the source to compile it yourself.

For more information on MOAR, checkout the following articles:
Dean Wilson’s Hands-on Discussion of MOAR
Puppet’s Formal Announcement of MOAR

Leave a Reply

Your email address will not be published. Required fields are marked *