[stable-2.6] Fix file state=touch not returning diff information
Fixes #41755
(cherry picked from commit 8bd245a
)
Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
This commit is contained in:
parent
3030625d1f
commit
d11a190349
2 changed files with 5 additions and 1 deletions
4
changelogs/fragments/file_touch_diff.yaml
Normal file
4
changelogs/fragments/file_touch_diff.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
bugfixes:
|
||||
- file module - The touch subcommand had its diff output broken during the
|
||||
2.6.x development cycle. This is now fixed (https://github.com/ansible/ansible/issues/41755)
|
|
@ -370,7 +370,7 @@ def execute_touch(path, follow):
|
|||
raise
|
||||
|
||||
# Unfortunately, touch always changes the file because it updates file's timestamp
|
||||
return {'dest': path, 'changed': True}
|
||||
return {'dest': path, 'changed': True, 'diff': diff}
|
||||
|
||||
|
||||
def ensure_file_attributes(path, follow):
|
||||
|
|
Loading…
Reference in a new issue