also enable transfer of explorer data back to the server
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
f22dcb5d8f
commit
1850042126
2 changed files with 11 additions and 5 deletions
|
@ -27,20 +27,22 @@
|
|||
: ${__cdist_manifest_dir:=$__cdist_config/manifests}
|
||||
: ${__cdist_manifest_init:=$__cdist_manifest_dir/init}
|
||||
|
||||
: ${__cdist_name_explorer:=explorers}
|
||||
|
||||
: ${__cdist_type_dir:=$__cdist_config/types}
|
||||
|
||||
: ${__cdist_cache_dir:=$__cdist_config/cache}
|
||||
: ${__cdist_cache_hosts:=$__cdist_cache_dir/hosts}
|
||||
: ${__cdist_cache_bin:=$__cdist_cache_dir/bin}
|
||||
|
||||
: ${__cdist_explorer_dir:=$__cdist_config/explorers}
|
||||
: ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer}
|
||||
|
||||
# Paths used on the target - must be kind of secure....
|
||||
: ${__cdist_remote_base_dir:=/var/lib/cdist}
|
||||
: ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/explorers}
|
||||
: ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/$__cdist_name_explorer}
|
||||
export __cdist_remote_explorer_dir
|
||||
: ${__cdist_remote_cache_dir:=$__cdist_remote_base_dir/cache}
|
||||
: ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/explorers}
|
||||
: ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/$__cdist_name_explorer}
|
||||
export __cdist_remote_cache_explorer
|
||||
: ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/bin}
|
||||
|
||||
|
|
|
@ -49,9 +49,13 @@ ssh root@${__cdist_target_host} \
|
|||
\"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \
|
||||
\"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\""
|
||||
|
||||
# Ensure local destination directory exists
|
||||
mkdir -p "$(__cdist_cache_host)/$__cdist_name_explorer"
|
||||
|
||||
# Transfer back all results
|
||||
# scp -r "root@${__cdist_target_host}:${__cdist_remote_dir}"
|
||||
|
||||
# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success
|
||||
scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \
|
||||
"$(__cdist_cache_host)/$__cdist_name_explorer"
|
||||
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue