Open main menu

CDOT Wiki β

Changes

OPS435 Python3 Lab 8

474 bytes added, 16:51, 4 July 2020
Creat privileged tasks: install and remove rpm package on remote machines
[raymond.chan@mtrx-node05pd lab8]$
</source>
: If you only need to connect to the same remote machine, you can specify the host and port number in the fabfile.py to save some typing then executing the fab command. Add the following two lines after the env.user line in your fabfile.py:<source lang='bash'>
env.port = '7200' # <-- please replace with the actual value of your VM's port number
env.hosts =['myvmlab.senecacollege.ca']
</source>
: Now you can run the fab command without the "--host" and "--port" option.
: Run the following two fab commands, note the results and compare their difference:<source lang='bash'>
fab installPackage
1,760
edits