mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-03 20:54:24 -07:00
parent
c2441c15c3
commit
5cbdaff9fd
1 changed files with 3 additions and 8 deletions
|
@ -47,7 +47,7 @@ class ActionModule(ActionBase):
|
||||||
|
|
||||||
return dest_stat['checksum']
|
return dest_stat['checksum']
|
||||||
|
|
||||||
def run(self, tmp=None, task_vars=None):
|
def run(self, tmp='', task_vars=None):
|
||||||
''' handler for template operations '''
|
''' handler for template operations '''
|
||||||
if task_vars is None:
|
if task_vars is None:
|
||||||
task_vars = dict()
|
task_vars = dict()
|
||||||
|
@ -69,9 +69,6 @@ class ActionModule(ActionBase):
|
||||||
result['msg'] = "src and dest are required"
|
result['msg'] = "src and dest are required"
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if tmp is None:
|
|
||||||
tmp = self._make_tmp_path()
|
|
||||||
|
|
||||||
if faf:
|
if faf:
|
||||||
source = self._get_first_available_file(faf, task_vars.get('_original_file', None, 'templates'))
|
source = self._get_first_available_file(faf, task_vars.get('_original_file', None, 'templates'))
|
||||||
if source is None:
|
if source is None:
|
||||||
|
@ -178,8 +175,6 @@ class ActionModule(ActionBase):
|
||||||
if result.get('changed', False) and self._play_context.diff:
|
if result.get('changed', False) and self._play_context.diff:
|
||||||
result['diff'] = diff
|
result['diff'] = diff
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# when running the file module based on the template data, we do
|
# when running the file module based on the template data, we do
|
||||||
# not want the source filename (the name of the template) to be used,
|
# not want the source filename (the name of the template) to be used,
|
||||||
|
@ -194,6 +189,6 @@ class ActionModule(ActionBase):
|
||||||
follow=True,
|
follow=True,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
result.update(self._execute_module(module_name='file', module_args=new_module_args, task_vars=task_vars))
|
result.update(self._execute_module(module_name='file', module_args=new_module_args, task_vars=task_vars))
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue