Hello, I'm new to Python and Fabric and my main goal is to adopt python to convert my shell scripts for administrative tasks on remote servers via SSH.
After some tryouts of subprocess which I found not really handy, I've decided to test Fabric. So, if I understood well, Fabric 2+ is a complete rewrite and that implies many changes in code and configuration for the users. I've found several tutorials and examples about how to use a gateway/bastion on the web but still fail to put that in my fabfile.py. Following the documentation at fabfile.org I've successfully run commands on target servers via my bastion machine. But I have no idea how to write a proper fabfile.py or its configuration file to use a gateway for specific target hosts. Could someone kindly give me examples please? -- Vu~