Fabric has other useful features, such as roles and context managers.
Other useful features in Fabric
Fabric roles
Fabric can define roles for hosts, and run only the tasks to role members. For example, we might have a bunch of database servers on which we need to validate whether the MySql service is up, and other web servers on which we need to validate whether the Apache service is up. We can group these hosts into roles, and execute functions based on those roles:
#!/usr/bin/python
__author__ = "Bassim Aly"
__EMAIL__ = "basim.alyy@gmail.com"
from fabric.api import *
env.hosts = [
'10.10.10.140', # ubuntu machine
'10.10.10.193', # CentOS machine
'10.10.10.130',
...