Merge branch 'feature__cdist_autodep_try2' of git://github.com/dheule/cdist

This commit is contained in:
Nico Schottelius 2014-02-06 15:48:45 +01:00
commit 41266a1946
2 changed files with 51 additions and 2 deletions

View file

@ -128,7 +128,6 @@ All objects that are created in a type manifest are automatically required
from the type that is calling them. This is called "autorequirement" in
cdist jargon.
OVERRIDES
---------
In some special cases, you would like to create an already defined object
@ -142,6 +141,35 @@ into an undefined situation.
THIS IS A BETA FEATURE AND MAY BE REMOVED AT ANY TIME.
CDIST_ORDER_DEPENDENCY is a EXPERIMENTAL FEATURE !
You can tell cdist to execute all types in the order in which they are created
in the manifest by exporting CDIST_ORDER_DEPENDENCY.
--------------------------------------------------------------------------------
# Tells cdist to execute all types in the order in which they are created ...
export CDIST_ORDER_DEPENDENCY=on
__sample_type 1
require="__some_type_somewhere/id" __sample_type 2
__example_type 23
# Now this types are executed in the creation order until the variable is unset
unset CDIST_ORDER_DEPENDENCY
# all now following types cdist makes the order ..
__not_in_order_type 42
# how it works :
# this lines above are translated to:
__sample_type 1
require="__some_type_somewhere/id __sample_type/1" __sample_type 2
require="__sample_type/2" __example_type 23
__not_in_order_type 42
--------------------------------------------------------------------------------
EXAMPLES
--------
The initial manifest may for instance contain the following code: