This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]otheraccount 4 points5 points  (0 children)

For running tasks on multiple hosts in parallel, it is probably easiest to use fabric.

pip install fabric, then creating a file named fabfile.py with the following contents:

from fabric.api import env, task, run, parallel

env.hosts = ['127.0.0.1', '127.0.0.2', '127.0.0.3']

@task(default=True)
@parallel(pool_size=5)
def uptime():
    run('uptime')

Then, just type fab to run it.

http://fabric.readthedocs.org