forked from ungleich-public/cdist
submit variables to cdist-remote-explorer-run
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
302b6ef58c
commit
dcb9900afc
1 changed files with 13 additions and 12 deletions
|
@ -71,28 +71,29 @@ while read object; do
|
||||||
done < "$object_listing"
|
done < "$object_listing"
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
object="$1"; shift
|
__object="$1"; shift
|
||||||
object_id="$(__cdist_object_id_from_object "$object")"
|
__object_id="$(__cdist_object_id_from_object "$__object")"
|
||||||
type="$(__cdist_type_from_object "$object")"
|
__cdist_type="$(__cdist_type_from_object "$__object")"
|
||||||
|
|
||||||
# Always copy object parameters (looks weired if done only for the ones with explorer)
|
# Always copy object parameters (looks weired if done only for the ones with explorer)
|
||||||
# Really always?
|
# Really always?
|
||||||
|
|
||||||
# Check if type of object has >= 1 explorer
|
# Check if type of object has >= 1 explorer
|
||||||
has_explorer="$(__cdist_type_has_explorer "$type")"
|
has_explorer="$(__cdist_type_has_explorer "$__cdist_type")"
|
||||||
|
|
||||||
# If so, run explorers on remote side
|
# If so, run explorers on remote side
|
||||||
if [ "$has_explorer" ]; then
|
if [ "$has_explorer" ]; then
|
||||||
echo "Running explorers for $object ..."
|
echo "Running explorers for $__object ..."
|
||||||
cdist-run-remote "$__cdist_target_host" \
|
cdist-run-remote "$__cdist_target_host" \
|
||||||
|
"__object=\"$__object\" __object_id=\"$__object_id\"" \
|
||||||
cdist-remote-explorer-run \
|
cdist-remote-explorer-run \
|
||||||
"$__cdist_name_var_type_explorer" \
|
"$__cdist_name_var_type_explorer" \
|
||||||
"$(__cdist_remote_type_explorer_dir "$type")" \
|
"$(__cdist_remote_type_explorer_dir "$__cdist_type")" \
|
||||||
"$(__cdist_remote_object_type_explorer_dir "$object")"
|
"$(__cdist_remote_object_type_explorer_dir "$__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 "$object")" \
|
"$(__cdist_remote_object_type_explorer_dir "$__object")" \
|
||||||
"$(__cdist_object_type_explorer_dir "$object")"
|
"$(__cdist_object_type_explorer_dir "$__object")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue