Directives ordering

Configuration in Rudder are based on desired states, describing the expected state of the system. However, there are cases where having order is desirable (like ensuring that a JVM is present before deploying an Application server, or ensuring a user is present before setting it sudoers), even if it will converge over the course of several agent runs.

When policies are generated for each nodes, all Directives based on a same Technique are merged together, preventing a complete ordering of all Directives. However, Rudder uses a best-effort method for ordering Directives, based on alphanumeric ordering.

Rudder tries to order first on Rules name, then on Directives name.


  • given three Techniques A, B and C
  • directives A1 and A2 based on Technique A, directives B1 and B2 based on B, directives C1 and C2 based on C
  • rule R1 having A1, B1 and C2 and rule R2 having A2, B2 and C2, both applied on a same node,
  • resulting ordering of directive will be: A1, A2, B1, B2, C2, C1

Please note that you should avoid configuration that relies on order to be applicable, due to the lack of strict ordering for now.