forked from ungleich-public/cdist
		
	update manifest document for in order execution
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								41266a1946
							
						
					
				
			
			
				commit
				
					
						724385fcf3
					
				
			
		
					 1 changed files with 39 additions and 28 deletions
				
			
		| 
						 | 
					@ -128,6 +128,19 @@ All objects that are created in a type manifest are automatically required
 | 
				
			||||||
from the type that is calling them. This is called "autorequirement" in
 | 
					from the type that is calling them. This is called "autorequirement" in
 | 
				
			||||||
cdist jargon.
 | 
					cdist jargon.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CREATE DEPENDENCIES FROM EXECUTION ORDER
 | 
				
			||||||
 | 
					-----------------------------------------
 | 
				
			||||||
 | 
					You can tell cdist to execute all types in the order in which they are created 
 | 
				
			||||||
 | 
					in the manifest by setting up the variable CDIST_ORDER_DEPENDENCY.
 | 
				
			||||||
 | 
					When cdist sees that this variable is setup, the current created object
 | 
				
			||||||
 | 
					automatically depends on the previously created object.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					It essentially helps you to build up blocks of code that build upon each other
 | 
				
			||||||
 | 
					(like first creating the directory xyz than the file below the directory).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					THIS IS A BETA FEATURE AND MAY BE REMOVED OR CHANGED AT ANY TIME.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
OVERRIDES
 | 
					OVERRIDES
 | 
				
			||||||
---------
 | 
					---------
 | 
				
			||||||
In some special cases, you would like to create an already defined object 
 | 
					In some special cases, you would like to create an already defined object 
 | 
				
			||||||
| 
						 | 
					@ -139,33 +152,7 @@ ATTENTION: Only use this feature if you are 100% sure in which order
 | 
				
			||||||
cdist encounter the affected objects, otherwhise this results 
 | 
					cdist encounter the affected objects, otherwhise this results 
 | 
				
			||||||
into an undefined situation. 
 | 
					into an undefined situation. 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
THIS IS A BETA FEATURE AND MAY BE REMOVED AT ANY TIME.
 | 
					THIS IS A BETA FEATURE AND MAY BE REMOVED OR CHANGED 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
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
--------------------------------------------------------------------------------
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -223,6 +210,30 @@ CDIST_ALLOW_OVERRIDE=yes __user foobar --password 'some_other_hash'
 | 
				
			||||||
# and stay at the original value of /home/foobarexample
 | 
					# and stay at the original value of /home/foobarexample
 | 
				
			||||||
--------------------------------------------------------------------------------
 | 
					--------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Dependencies defined by execution order work as following:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SEE ALSO
 | 
					SEE ALSO
 | 
				
			||||||
--------
 | 
					--------
 | 
				
			||||||
| 
						 | 
					@ -232,5 +243,5 @@ SEE ALSO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPYING
 | 
					COPYING
 | 
				
			||||||
-------
 | 
					-------
 | 
				
			||||||
Copyright \(C) 2010-2012 Nico Schottelius. Free use of this software is
 | 
					Copyright \(C) 2010-2014 Nico Schottelius. Free use of this software is
 | 
				
			||||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
 | 
					granted under the terms of the GNU General Public License version 3 (GPLv3).
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue