mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Addresses #6591 Hide diff for lineinfile if file did not change.
This commit is contained in:
parent
991399edf0
commit
b8158f5f6a
1 changed files with 2 additions and 1 deletions
|
@ -123,7 +123,8 @@ class ActionModule(object):
|
|||
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, inject=inject, complex_args=complex_args)
|
||||
res.diff = dict(before=dest_contents, after=resultant)
|
||||
if res.result['changed']:
|
||||
res.diff = dict(before=dest_contents, after=resultant)
|
||||
return res
|
||||
else:
|
||||
return self.runner._execute_module(conn, tmp, 'file', module_args, inject=inject, complex_args=complex_args)
|
||||
|
|
Loading…
Reference in a new issue