Skip to content
Permalink
Browse files

ansible: stop passing through remote_tmp variable

Ansiballz does not use remote_tmp so neither should we, per #239.
  • Loading branch information...
dw committed May 4, 2018
1 parent 80132d3 commit d9b7cad0dce57006ebbdb1c972225c64a6c8e2e2
Showing with 5 additions and 11 deletions.
  1. +0 −1 ansible_mitogen/mixins.py
  2. +1 −5 ansible_mitogen/planner.py
  3. +2 −3 ansible_mitogen/runner.py
  4. +2 −2 ansible_mitogen/target.py
@@ -319,7 +319,6 @@ def _execute_module(self, module_name=None, module_args=None, tmp=None,
connection=self._connection,
module_name=mitogen.utils.cast(module_name),
module_args=mitogen.utils.cast(module_args),
remote_tmp=mitogen.utils.cast(self._get_remote_tmp()),
task_vars=task_vars,
templar=self._templar,
env=mitogen.utils.cast(env),
@@ -92,7 +92,7 @@ class Invocation(object):
target.run_module() or helpers.run_module_async() in the target context.
"""
def __init__(self, action, connection, module_name, module_args,
remote_tmp, task_vars, templar, env, wrap_async):
task_vars, templar, env, wrap_async):
#: ActionBase instance invoking the module. Required to access some
#: output postprocessing methods that don't belong in ActionBase at
#: all.
@@ -104,9 +104,6 @@ def __init__(self, action, connection, module_name, module_args,
self.module_name = module_name
#: Final module arguments.
self.module_args = module_args
#: Value of 'remote_tmp' parameter, to allow target to create temporary
#: files in correct location.
self.remote_tmp = remote_tmp
#: Task variables, needed to extract ansible_*_interpreter.
self.task_vars = task_vars
#: Templar, needed to extract ansible_*_interpreter.
@@ -198,7 +195,6 @@ def plan(self, invocation, **kwargs):
path=invocation.module_path,
args=invocation.module_args,
env=invocation.env,
remote_tmp=invocation.remote_tmp,
**kwargs
)

@@ -92,15 +92,14 @@ class Runner(object):
Subclasses may override `_run`()` and extend `setup()` and `revert()`.
"""
def __init__(self, module, remote_tmp, service_context,
emulate_tty=None, raw_params=None, args=None, env=None):
def __init__(self, module, service_context, emulate_tty=None,
raw_params=None, args=None, env=None):
if args is None:
args = {}
if raw_params is not None:
args['_raw_params'] = raw_params

self.module = utf8(module)
self.remote_tmp = utf8(os.path.expanduser(remote_tmp))
self.service_context = service_context
self.emulate_tty = emulate_tty
self.raw_params = raw_params
@@ -239,8 +239,8 @@ def reset_temp_dir(econtext):
"""
Create one temporary directory to be reused by all runner.py invocations
for the lifetime of the process. The temporary directory is changed for
each forked job, and emptied as necessary runner.py::_cleanup_temp() after
each module invocation.
each forked job, and emptied as necessary by runner.py::_cleanup_temp()
after each module invocation.
The result is that a context need only create and delete one directory
during startup and shutdown, and no further filesystem writes need occur

0 comments on commit d9b7cad

Please sign in to comment.
You can’t perform that action at this time.