more cleanups, __cdist prefixes
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
9955dc74c6
commit
b3d7cf3192
3 changed files with 11 additions and 9 deletions
|
@ -32,7 +32,6 @@ __cdist_object="$1"; shift
|
||||||
__object_id="$(__cdist_object_id_from_object "$__cdist_object")"
|
__object_id="$(__cdist_object_id_from_object "$__cdist_object")"
|
||||||
__cdist_type="$(__cdist_type_from_object "$__cdist_object")"
|
__cdist_type="$(__cdist_type_from_object "$__cdist_object")"
|
||||||
|
|
||||||
|
|
||||||
# Check if type of object has >= 1 explorer
|
# Check if type of object has >= 1 explorer
|
||||||
__cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")"
|
__cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")"
|
||||||
# Run the type explorers for the current object if any
|
# Run the type explorers for the current object if any
|
||||||
|
@ -47,8 +46,8 @@ if [ "$__cdist_has_explorer" ]; then
|
||||||
|
|
||||||
echo "Running explorers for $__cdist_object ..."
|
echo "Running explorers for $__cdist_object ..."
|
||||||
# Copy object parameters
|
# Copy object parameters
|
||||||
cdist-dir push "$__cdist_target_host" \
|
cdist-dir push "$__cdist_target_host" \
|
||||||
"$(__cdist_object_parameter_dir "$__cdist_object")" \
|
"$(__cdist_object_parameter_dir "$__cdist_object")" \
|
||||||
"$(__cdist_remote_object_parameter_dir "$__cdist_object")"
|
"$(__cdist_remote_object_parameter_dir "$__cdist_object")"
|
||||||
|
|
||||||
# Execute explorers
|
# Execute explorers
|
||||||
|
@ -62,7 +61,7 @@ if [ "$__cdist_has_explorer" ]; then
|
||||||
"$(__cdist_remote_object_type_explorer_dir "$__cdist_object")"
|
"$(__cdist_remote_object_type_explorer_dir "$__cdist_object")"
|
||||||
|
|
||||||
# Copy back results
|
# Copy back results
|
||||||
cdist-dir pull "$__cdist_target_host" \
|
cdist-dir pull "$__cdist_target_host" \
|
||||||
"$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" \
|
"$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" \
|
||||||
"$(__cdist_object_type_explorer_dir "$__cdist_object")"
|
"$(__cdist_object_type_explorer_dir "$__cdist_object")"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -29,15 +29,15 @@ set -eu
|
||||||
__cdist_target_host="$1"; shift
|
__cdist_target_host="$1"; shift
|
||||||
__cdist_object="$1"; shift
|
__cdist_object="$1"; shift
|
||||||
|
|
||||||
code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}"
|
__cdist_code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}"
|
||||||
code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}"
|
__cdist_code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}"
|
||||||
|
|
||||||
echo "Generating local code for $__cdist_object ..."
|
echo "Generating local code for $__cdist_object ..."
|
||||||
cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \
|
cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \
|
||||||
"${__cdist_name_gencode_local}" > "${code_local}"
|
"${__cdist_name_gencode_local}" > "${__cdist_code_local}"
|
||||||
|
|
||||||
echo "Generating remote code for $__cdist_object ..."
|
echo "Generating remote code for $__cdist_object ..."
|
||||||
cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \
|
cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \
|
||||||
"${__cdist_name_gencode_remote}" > "${code_remote}"
|
"${__cdist_name_gencode_remote}" > "${__cdist_code_remote}"
|
||||||
|
|
||||||
chmod u+x "${code_local}" "${code_remote}"
|
chmod u+x "${__cdist_code_local}" "${__cdist_code_remote}"
|
||||||
|
|
|
@ -14,6 +14,9 @@ CORE
|
||||||
cdist-deploy-to: more dependency of cdist-manifest-run, but a lot of
|
cdist-deploy-to: more dependency of cdist-manifest-run, but a lot of
|
||||||
less cycles consumed
|
less cycles consumed
|
||||||
|
|
||||||
|
- cdist-object-gencode: remove code if output empty?
|
||||||
|
- also take care of that in cdist-code-run!
|
||||||
|
|
||||||
TYPES
|
TYPES
|
||||||
------
|
------
|
||||||
Types to be written/extended:
|
Types to be written/extended:
|
||||||
|
|
Loading…
Reference in a new issue