title: Fabric: call run() for an explicit host
body: <p>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:</p>
  
  <pre><code>from fabric.api import run
  
  for servername in servernames:
      load_str = run('cat /proc/loadavg | cut -d' ' -f1', host=servername)
  </code></pre>
  
  <p>but fabric doesn't allow me to specify the hostname this way, I found this IMO ugly way:</p>
  
  <pre><code>from fabric.api import env, run
  
  for servername in servernames:
      env.host_string = servername
      load_str = run('cat /proc/loadavg | cut -d' ' -f1')
  </code></pre>
  
  <p>are there more elegant ways?</p>
  
  <p>Using paramiko directly, as suggested <a href="https://stackoverflow.com/questions/3278880/stand-alone-fabfile-for-fabric">here</a> pushes me to write an own module that abstracts it - quoting from fabrics website, that's exactly what fabric should do for me:</p>
  
  <blockquote>
    <p>In addition to use via the fab fool, Fabric’s components may be imported into other Python code, providing a Pythonic interface to the SSH protocol suite at a higher level than that provided by e.g. Paramiko (which Fabric itself leverages.)</p>
  </blockquote>