Changes

Jump to: navigation, search

OPS435 Python3 Lab 8

11 bytes added, 15:48, 10 November 2019
Replace run() function calls with sudo()
:* Change env.user from 'root' to your account on your vm in myvmlab.
:* Change all the commands that need super user privilege from calling the run() function to instead calling the sudo() function. Here is an example on replacing run() with sudo():<source lang="python">
 
def getFirewallConfig():
fw_config = sudo("iptables -L -n -v")
print(fw_config)
</source>
: Test your updated fabfile.py until you get the same result as when you apply it to your own worker VM.
1,760
edits

Navigation menu