template: change to pass along the correct template path (#35027)

* template: change to pass along the correct template path

* standardise tmp path behaviour

* removed if condition as it should not be needed
This commit is contained in:
Jordan Borean
2018-01-19 09:51:42 +10:00
committed by GitHub
parent 676ce74cbf
commit 389f4ef1fb
12 changed files with 41 additions and 25 deletions

View File

@@ -15,6 +15,8 @@ class ActionModule(ActionBase):
self._supports_async = True
results = super(ActionModule, self).run(tmp, task_vars)
tmp = self._connection._shell.tempdir
# Command module has a special config option to turn off the command nanny warnings
if 'warn' not in self._task.args:
self._task.args['warn'] = C.COMMAND_WARNINGS
@@ -24,6 +26,6 @@ class ActionModule(ActionBase):
if not wrap_async:
# remove a temporary path we created
self._remove_tmp_path(self._connection._shell.tempdir)
self._remove_tmp_path(tmp)
return results