Open main menu

CDOT Wiki β

Changes

OPS435 Python3 Lab 8

4 bytes removed, 13:23, 10 November 2019
INVESTIGATION 2: Fabric practice
fab -l
</source>
: you should get a list of tasks stored in your fabfile.py:<source lang="bash">
[rchan@centos7 lab8]$ fab -f fabfile.py -l
Available commands:
getHostname
</source>
: To perform the task of getHostname on the worker machine 192.168.122.169, we run it on the controller machine like this:<source lang="bash">
[rchan@centos7 lab8]$ fab -f fabfile.py -H 192.168.122.169. getHostname
[192.168.122.169] Executing task 'getHostname'
1,760
edits