python - Switching environments within a fabric script -


i want try execute this

env.host_string = "server1.com" cd("/tmp"):     run("some command)  #switch servers env.host_string = "server2.com"  cd("/home"):     run("some other command") 

the issue commands need executed sequentially , not in parrelel. can't figure out way in fabric. i've tried with env("hostname"): not work.

use @serial decorator avoid parallel execution of tasks. try @hosts decorator (see same page) limit each task subset of hosts, , argue hosts when call fabric.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -