forked from ungleich-public/cdist
++log
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
eeaab438c2
commit
a53782805d
1 changed files with 23 additions and 0 deletions
|
@ -12,12 +12,19 @@ Solutions:
|
||||||
echo $function $args
|
echo $function $args
|
||||||
) | ssh foo
|
) | ssh foo
|
||||||
|
|
||||||
|
Works partly, does not work for export = ...
|
||||||
|
Needs to copy over lib every time again!
|
||||||
|
|
||||||
2)
|
2)
|
||||||
scp $dir/lib.sh root@foo:/tmp/lib.sh
|
scp $dir/lib.sh root@foo:/tmp/lib.sh
|
||||||
cat << DONE | ssh root@foo sh
|
cat << DONE | ssh root@foo sh
|
||||||
source /tmp/lib.sh
|
source /tmp/lib.sh
|
||||||
|
export foo=bla
|
||||||
|
function args
|
||||||
DONE
|
DONE
|
||||||
|
|
||||||
|
Caches lib directory
|
||||||
|
|
||||||
3) follow up to 1)
|
3) follow up to 1)
|
||||||
__run_remote()
|
__run_remote()
|
||||||
{
|
{
|
||||||
|
@ -28,6 +35,22 @@ Solutions:
|
||||||
|
|
||||||
eof
|
eof
|
||||||
|
|
||||||
|
4) final solution
|
||||||
|
- write for every remote job a new function
|
||||||
|
- this functions prepares env + reuses ssh header
|
||||||
|
|
||||||
|
__cdist_remote_explorer()
|
||||||
|
{
|
||||||
|
cat << eof
|
||||||
|
$__cdist_remote_header
|
||||||
|
export foo1=bar
|
||||||
|
export foo2=bar
|
||||||
|
export foo3=bar
|
||||||
|
|
||||||
|
"$@"
|
||||||
|
eof | __cdist_ssh
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Problems found and solved:
|
Problems found and solved:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue