Hi everyone,
What's the equivalent of
fabric.tasks.execute in the new API? One convenience of that function is, you can create a task assuming that you're working on only one host at a time and then seamlessly execute it across a list of hosts. For ex,
from fabric.api import run
from fabric.tasks import execute
def do_something():
uptime_result = run("uptime").stdout
# Do more with uptime_result later in code.
if __name__ == "__main__":
execute(do_something, hosts=["address@hidden"])
try:
results = connections_array.run('pidof foobar', hide="both")
except GroupException as e:
results = e.result
pids = []
for _, result in results.items():
# do what I want. capture outputs of various connections in above array.
# Reusing of previous outputs in series of operations gets hard.
# Do second operations by capturing previous output.
Any suggestions on how to make the new API friendly to use when using multiple hosts?
--
Cheers,
Abhijeet Rastogi (shadyabhi)