I would use execute to call my task to run git pull, then have the task return the output to the parent task and write it to a log file for viewing in nano. For example:
from fabric.api import run, cd, execute, task, local
@task
def git_pull():
with cd('/home/myuser/mygitrepo'):
return run('git pull')
@task
def bulk_pull():
results = execute(git_pull, hosts=['host1', 'host2'])
with open('gitpull.log', 'w') as f:
for host, output in results.iteritems():
f.write("%s\n====\n%s\n\n" % (host, output))
local('nano gitpull.log')
Note that you are no longer able to specify hosts via command line with this method, since bulk_pull should only target one host. Run via "fab bulk_pull"