Remove tmp as a parameter to the connection plugins

There doesn't appear to be anything that actually uses tmp_path in the
connection plugins so we don't need to pass that in to exec_command.
That change also means that we don't need to pass tmp_path around in
many places in the action plugins any more.  there may be more cleanup
that can be done there as well (the action plugin's public run() method
takes tmp as a keyword arg but that may not be necessary).

As a sideeffect of this patch, some potential problems with chmod and
the patch, assemble, copy, and template modules has been fixed (those
modules called _remote_chmod() with the wrong order for their
parameters.  Removing the tmp parameter fixed them.)
This commit is contained in:
Toshio Kuratomi 2015-09-24 13:29:36 -07:00
parent 95b371dd60
commit a1428d6bed
24 changed files with 81 additions and 73 deletions

View file

@ -88,9 +88,9 @@ class Connection(ConnectionBase):
return self
def exec_command(self, cmd, tmp_path, in_data=None, sudoable=False):
def exec_command(self, cmd, in_data=None, sudoable=False):
""" Run a command on the local host """
super(Connection, self).exec_command(cmd, tmp_path, in_data=in_data, sudoable=sudoable)
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
# Don't currently support su
if in_data: