diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2018-06-20 13:57:48 -0700 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2018-06-21 14:36:33 -0700 |
commit | d11a190349ee93b7f1ce9d008d077ec1f99c9a60 (patch) | |
tree | e05ceb7c4bca2b248f5474c559ae2a4ccc65d100 | |
parent | 3030625d1fc3241c28ac47cf95bfe4ef8eb2cb50 (diff) | |
download | ansible-d11a190349ee93b7f1ce9d008d077ec1f99c9a60.tar.gz |
[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>
-rw-r--r-- | changelogs/fragments/file_touch_diff.yaml | 4 | ||||
-rw-r--r-- | lib/ansible/modules/files/file.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/changelogs/fragments/file_touch_diff.yaml b/changelogs/fragments/file_touch_diff.yaml new file mode 100644 index 0000000000..906cc98d8d --- /dev/null +++ b/changelogs/fragments/file_touch_diff.yaml @@ -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) diff --git a/lib/ansible/modules/files/file.py b/lib/ansible/modules/files/file.py index 8beb68848e..6fc5622482 100644 --- a/lib/ansible/modules/files/file.py +++ b/lib/ansible/modules/files/file.py @@ -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): |