I'm trying to understand how fabric is working with multiple commands on one machine. I need to run several commands on each host (thousands of hosts) and would like to know what would be best.
Using multiple runs:
res_1 = run(command_1)
res_2 = run(command_2)
...
...
res_n = run(command_n)
Or:
res = run(command_1 && command_2 && ... command_n)
res.splitlines()
res_1 = res[0]
res_2 = res[1]
...
...
res_n = res[n-1]
What I want to know is how fabric handles multiple runs, will it open multiple sessions or do all commands in the same session?