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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 41 additions and 25 deletions

View file

@ -44,6 +44,8 @@ class ActionModule(ActionBase):
result = super(ActionModule, self).run(tmp, task_vars)
tmp = self._connection._shell.tempdir
try:
if self._play_context.check_mode:
result['skipped'] = True
@ -212,6 +214,6 @@ class ActionModule(ActionBase):
result.update(dict(changed=False, md5sum=local_md5, file=source, dest=dest, checksum=local_checksum))
finally:
self._remove_tmp_path(self._connection._shell.tempdir)
self._remove_tmp_path(tmp)
return result