export __object and __object_id
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								ce15edf4d6
							
						
					
				
			
			
				commit
				
					
						24ce08820e
					
				
			
		
					 3 changed files with 12 additions and 4 deletions
				
			
		| 
						 | 
					@ -37,6 +37,8 @@ set -u
 | 
				
			||||||
: ${__cdist_name_init:=init}
 | 
					: ${__cdist_name_init:=init}
 | 
				
			||||||
: ${__cdist_name_manifest:=manifest}
 | 
					: ${__cdist_name_manifest:=manifest}
 | 
				
			||||||
: ${__cdist_name_manifest_dir:=manifests}
 | 
					: ${__cdist_name_manifest_dir:=manifests}
 | 
				
			||||||
 | 
					: ${__cdist_name_object:=object}
 | 
				
			||||||
 | 
					: ${__cdist_name_object_id:=object_id}
 | 
				
			||||||
: ${__cdist_name_out_dir:=out}
 | 
					: ${__cdist_name_out_dir:=out}
 | 
				
			||||||
: ${__cdist_name_conf_dir:=conf}
 | 
					: ${__cdist_name_conf_dir:=conf}
 | 
				
			||||||
: ${__cdist_name_target_host:=target_host}
 | 
					: ${__cdist_name_target_host:=target_host}
 | 
				
			||||||
| 
						 | 
					@ -46,6 +48,8 @@ set -u
 | 
				
			||||||
: ${__cdist_name_var_explorer:=__$__cdist_name_explorer}
 | 
					: ${__cdist_name_var_explorer:=__$__cdist_name_explorer}
 | 
				
			||||||
: ${__cdist_name_var_manifest:=__$__cdist_name_manifest_dir}
 | 
					: ${__cdist_name_var_manifest:=__$__cdist_name_manifest_dir}
 | 
				
			||||||
: ${__cdist_name_var_target_host:=__$__cdist_name_target_host}
 | 
					: ${__cdist_name_var_target_host:=__$__cdist_name_target_host}
 | 
				
			||||||
 | 
					: ${__cdist_name_var_object:=__$__cdist_name_object}
 | 
				
			||||||
 | 
					: ${__cdist_name_var_object_id:=__$__cdist_name_object_id}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Name of the base directory containing the initial manifests
 | 
					# Name of the base directory containing the initial manifests
 | 
				
			||||||
: ${__cdist_name_manifests:=manifests}
 | 
					: ${__cdist_name_manifests:=manifests}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -49,11 +49,11 @@ cdist-explorer-run-init       "$__cdist_target_host" "$__cdist_out_explorer_dir"
 | 
				
			||||||
# Create initial object base
 | 
					# Create initial object base
 | 
				
			||||||
cdist-manifest-run-init       "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
					cdist-manifest-run-init       "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exit 2
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Create dependent objects - BUG: does not abort on error in manifest!!!!
 | 
					# Create dependent objects - BUG: does not abort on error in manifest!!!!
 | 
				
			||||||
cdist-manifest-run-all        "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
					cdist-manifest-run-all        "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Run explorer of each type for every object of types with explorer
 | 
					# Run explorer of each type for every object of types with explorer
 | 
				
			||||||
cdist-object-explorer-all     "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
					cdist-object-explorer-all     "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
				
			||||||
cdist-object-codegen-all      "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs"
 | 
					cdist-object-codegen-all      "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -67,8 +67,12 @@ while [ "$__cdist_new_objects_created" = "y"  ]; do
 | 
				
			||||||
         if [ -x "${__cdist_manifest}" ]; then
 | 
					         if [ -x "${__cdist_manifest}" ]; then
 | 
				
			||||||
            echo "Executing manifest ${__cdist_manifest} ..."
 | 
					            echo "Executing manifest ${__cdist_manifest} ..."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            cdist-manifest-run "$__cdist_target_host" "$__cdist_cur_object_dir" \
 | 
					            # Make variables available to non-core
 | 
				
			||||||
               "$__cdist_manifest" "$__cdist_new_objects_dir" "$__cdist_object_id"
 | 
					            export $__cdist_name_object="$__cdist_object"
 | 
				
			||||||
 | 
					            export $__cdist_name_object_id="$__cdist_object_id"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" \
 | 
				
			||||||
 | 
					               "$__cdist_new_objects_dir" "$__cdist_object_id"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            __cdist_object_list "${__cdist_new_objects_dir}" > "$__cdist_new_objects_list"
 | 
					            __cdist_object_list "${__cdist_new_objects_dir}" > "$__cdist_new_objects_list"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue