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
Post a Comment