mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-01 12:40:22 -07:00
Fixing up some check-mode stuff
This commit is contained in:
parent
ad53b6f36a
commit
cf51d0a790
11 changed files with 26 additions and 68 deletions
|
@ -139,15 +139,6 @@ class ActionModule(ActionBase):
|
|||
),
|
||||
)
|
||||
|
||||
# FIXME: noop stuff needs to be sorted out
|
||||
#if self.runner.noop_on_check(task_vars):
|
||||
# return ReturnData(conn=conn, comm_ok=True, result=dict(changed=True), diff=dict(before_header=dest, after_header=source, before=dest_contents, after=resultant))
|
||||
#else:
|
||||
# res = self.runner._execute_module(conn, tmp, 'copy', module_args_tmp, task_vars=task_vars, complex_args=complex_args)
|
||||
# if res.result.get('changed', False):
|
||||
# res.diff = dict(before=dest_contents, after=resultant)
|
||||
# return res
|
||||
|
||||
result = self._execute_module(module_name='copy', module_args=new_module_args, task_vars=task_vars)
|
||||
if result.get('changed', False):
|
||||
result['diff'] = dict(before=dest_contents, after=resultant)
|
||||
|
@ -169,12 +160,5 @@ class ActionModule(ActionBase):
|
|||
),
|
||||
)
|
||||
|
||||
# FIXME: this may not be required anymore, as the checkmod params
|
||||
# should be in the regular module args?
|
||||
# be sure to task_vars the check mode param into the module args and
|
||||
# rely on the file module to report its changed status
|
||||
#if self.runner.noop_on_check(task_vars):
|
||||
# new_module_args['CHECKMODE'] = True
|
||||
|
||||
return self._execute_module(module_name='file', module_args=new_module_args, task_vars=task_vars)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue