Closed hanks closed 8 years ago
The easiest way is to manually ssh to the bastion server, have the fabfile.py there, and run fab there on the bastion.
Fabric cannot currently run anything on the "gateway" host. That would be a big feature addition.
It is possible that you could make a task which acts on the bastion server, with ssh-agent-forwarding enabled, running a custom rsync command on the bastion server, and specifying the remote serverX as the destination in the custom rsync command. It's up to you to figure out the details of this though.
Thanks, I finally put fabric.py to bastion server as you said.
Here is my scenario:
I want to execute local fab command to rsync code in the bastion server to the web server parallel, but I find
rsync_project
can only run as a local command, fail to find code base path in my local machine. How to slove this issue, and is there a way to setlocal
host string as the bastion server to let rsync_project run on the bastion server properly?Thank you for you time.