flightplan
flightplan copied to clipboard
No access to remote host name in local.transfer()
Perhaps this is a poor usage pattern, but I have a need to access the remote host name or at least the target name, in transfer() (the files to be transferred are based on the remote hostname or target). In earlier versions I could do this using something like local.flight.flightplan.target.destination (IIRC) but now I don't have that (I could fudge using local._context.target but I am guessing underscore prefixed properties should be treated as private following Unix conventions).
I am wondering if this may be a general need, not just a peculiarity of my usage :-).
See this section in the docs: https://github.com/pstadler/flightplan#accessing-runtime-information
Is this what you're asking for?
For local.transfer() (IIUC) even though there is a remote end, that info is not accessible via the runtime. But I came up with a workaround using plan.runtime.target for my current need. Thank you for the response.
I am bumping up against this issue once again. @pstadler is there an easy way to accomplish this? My guess is not? Because the looping over the target hosts occurs within the local.transfer(), but I thought I'd ask to be sure.
This is a bug. Shouldn't be too hard to fix. Will try to do another release pretty soon
On 15 May 2017 at 02:55:41, Ravi Sarma ([email protected]) wrote:
I am bumping up against this issue once again. @pstadler https://github.com/pstadler is there an easy way to accomplish this? My guess is not? Because the looping over the target hosts occurs within the local.transfer(), but I thought I'd ask to be sure.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pstadler/flightplan/issues/140#issuecomment-301352659, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkoIZU9wZ-QyvnrUJ8Uw9hX69eVSZkhks5r56KNgaJpZM4IsKVE .
Ah sorry, I thought this is about another ticket. This is indeed hard to solve. Maybe you should simply roll with an own implementation running rsync in a local loop.