Running SSH commands on multiple servers
Looks like Fabric is what you need.

Fabric is a pretty simple deploy tool (comparing to Ansible/Puppet/etc), that lets you execute simple shell commands over SSH (Paramiko inside).  

Features you will get from it:


You can specify SSH key path using command line:

fab command -i /path/to/key.pem


or parse it from command line:

import sys
from fabric.api import *
...
env.key_filename = sys.argv[2] or '/path/to/keyfile.pem'

Describe local/remote tasks in pythonic way:
    from fabric.api import *

def local_test():
    local('nosetests .')

def remote_pull():
    run('git pull')


And chain/group/do-anything-you want to them.     
You can describe host list:

hosts = [&lt;your_hosts_list&gt;]
env.hosts = ['disc{}.{}'.format(host, index) for host in hosts for index in xrange(1,3)]


or you can describe roles:

env.roledefs['group1'] = ['host.name.com']
env.roledefs['group2'] = ['host1.name.com', 'host2.name.com']


and use this roles/hosts in your tasks configuration then:

@roles('group1')
@runs_once
def add_tag(version):
    run('git tag -f {}'.format(version))



And many more features out of the box!