diff --git a/README.rst b/README.rst index 507b5270..03941797 100644 --- a/README.rst +++ b/README.rst @@ -7,6 +7,9 @@ parallel-ssh uses asychronous network requests - there is *no* multi-threading o This is a *requirement* for commands on many (hundreds/thousands/hundreds of thousands) of hosts which would grind a system to a halt simply by having so many processes/threads all wanting to execute if done with multi-threading/processing. +.. image:: https://img.shields.io/pypi/v/parallel-ssh.svg + :target: https://pypi.python.org/pypi/parallel-ssh + :alt: Latest Version .. image:: https://travis-ci.org/pkittenis/parallel-ssh.svg?branch=master :target: https://travis-ci.org/pkittenis/parallel-ssh .. image:: https://coveralls.io/repos/pkittenis/parallel-ssh/badge.png?branch=master diff --git a/pssh.py b/pssh.py index d9c25a6d..cbfc5732 100644 --- a/pssh.py +++ b/pssh.py @@ -431,7 +431,7 @@ def __init__(self, hosts, # To hold host clients self.host_clients = dict((host, None) for host in hosts) - def run_command(self, *args, **kwargs): + def run_command(self, *args, sudo=False, **kwargs): """Run command on all hosts in parallel, honoring self.pool_size, and return output buffers. @@ -441,6 +441,8 @@ def run_command(self, *args, **kwargs): :param args: Positional arguments for command :type args: tuple + :param sudo: (Optional) Run with sudo. Defaults to False + :type sudo: bool :param kwargs: Keyword arguments for command :type kwargs: dict