Changes

Jump to: navigation, search

OPS435 Python3 Lab 8

45 bytes added, 11:23, 4 July 2020
PART 1: Simplest example
== PART 1: Simplest example ==
===Creating non-privileged tasks: Getting the hostname of the remote machinemachines===: Add the following contents to the file default fabric script called "fabfile.py" in your lab8 directory:<source lang="python">
from fabric.api import *
env.user = 'student'
# Define the task to get the hostname of the remote machinemachines
def getHostname():
name = run("hostname")
1,760
edits

Navigation menu