Fabric: call run() for an explicit host
问题 I'd like to use fabric as a tool to gather all server loads and process the values afterward, I thought of something like this: from fabric.api import run for servername in servernames: load_str = run('cat /proc/loadavg | cut -d' ' -f1', host=servername) but fabric doesn't allow me to specify the hostname this way, I found this IMO ugly way: from fabric.api import env, run for servername in servernames: env.host_string = servername load_str = run('cat /proc/loadavg | cut -d' ' -f1') are there