How it works...

This recipe demonstrates how a system administration task can be done remotely using a Python script. There are two functions present in this script. The remote_server() function sets up the Fabric env environment variables, for example, the hostname, user, password, and so on.

The other function, install_package(), calls the run() function. This takes the commands that you usually type in the command line. In this case, the command is pip install yolk. This installs the Python package, yolk, with pip. As compared to the previously described recipes, this method of running a remote command using Fabric is easier and more efficient.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.226.79