@@ -336,8 +336,7 @@ def __init__(self, hosts,
336336 self .channel_timeout = channel_timeout
337337
338338 def run_command (self , command , sudo = False , user = None , stop_on_errors = True ,
339- shell = None , use_shell = True , use_pty = True , host_args = None ,
340- environment = None ):
339+ shell = None , use_shell = True , use_pty = True , host_args = None ):
341340 """Run command on all hosts in parallel, honoring self.pool_size,
342341 and return output buffers.
343342
@@ -384,10 +383,6 @@ def run_command(self, command, sudo=False, user=None, stop_on_errors=True,
384383 host list - :py:class:`pssh.exceptions.HostArgumentException` is raised \
385384 otherwise
386385 :type host_args: tuple or list
387- :param environment: (Optional) Environment variables to be exposed to \
388- command to be run. This requires that ``AcceptEnv`` server setting \
389- is enabled - variables will silently not be set otherwise
390- :type environment: dict
391386
392387 :rtype: Dictionary with host as key and \
393388 :py:class:`pssh.output.HostOutput` as value as per \
@@ -630,8 +625,7 @@ def run_command(self, command, sudo=False, user=None, stop_on_errors=True,
630625 cmds = [self .pool .spawn (self ._exec_command , host ,
631626 command % host_args [host_i ],
632627 sudo = sudo , user = user , shell = shell ,
633- use_shell = use_shell , use_pty = use_pty ,
634- environment = environment )
628+ use_shell = use_shell , use_pty = use_pty )
635629 for host_i , host in enumerate (self .hosts )]
636630 except IndexError :
637631 raise HostArgumentException (
@@ -641,8 +635,7 @@ def run_command(self, command, sudo=False, user=None, stop_on_errors=True,
641635 cmds = [self .pool .spawn (
642636 self ._exec_command , host , command ,
643637 sudo = sudo , user = user , shell = shell ,
644- use_shell = use_shell , use_pty = use_pty ,
645- environment = environment )
638+ use_shell = use_shell , use_pty = use_pty )
646639 for host in self .hosts ]
647640 for cmd in cmds :
648641 try :
@@ -660,8 +653,7 @@ def _get_host_config_values(self, host):
660653 return _user , _port , _password , _pkey
661654
662655 def _exec_command (self , host , command , sudo = False , user = None ,
663- shell = None , use_shell = True , use_pty = True ,
664- environment = None ):
656+ shell = None , use_shell = True , use_pty = True ):
665657 """Make SSHClient, run command on host"""
666658 if host not in self .host_clients or self .host_clients [host ] is None :
667659 _user , _port , _password , _pkey = self ._get_host_config_values (host )
@@ -682,7 +674,7 @@ def _exec_command(self, host, command, sudo=False, user=None,
682674 channel_timeout = self .channel_timeout )
683675 return self .host_clients [host ].exec_command (
684676 command , sudo = sudo , user = user , shell = shell ,
685- use_shell = use_shell , use_pty = use_pty , environment = environment )
677+ use_shell = use_shell , use_pty = use_pty )
686678
687679 def get_output (self , cmd , output ):
688680 """Get output from command.
0 commit comments