class FabricSupport:

    def __init__(self):
        pass

def hostname(self):
    run('hostname')

def df(self):
    run('df -h')

def execute(self, task, hosts):
    get_task = 'task = self.%s' % task
exec(get_task)
execute(task, hosts=hosts)
Passing a Fabric env.hosts sting as a variable is not work in function