|
|
@ -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
|
|
|
|