Merge branch 'modules_issue_1568' of https://github.com/ajdecon/ansible into ajdecon-modules_issue_1568

This commit is contained in:
James Cammarata 2017-05-18 02:28:08 -05:00
commit 5728bd9065

View file

@ -271,6 +271,14 @@ class ActionModule(ActionBase):
self._remove_tmp_path(tmp)
continue
# Fix for https://github.com/ansible/ansible-modules-core/issues/1568.
# If checksums match, and follow = True, find out if 'dest' is a link. If so,
# change it to point to the source of the link.
if follow:
dest_status_nofollow = self._execute_remote_stat(dest_file, all_vars=task_vars, follow=False)
if dest_status_nofollow['islnk'] and 'lnk_source' in dest_status_nofollow.keys():
dest = dest_status_nofollow['lnk_source']
# Build temporary module_args.
new_module_args = self._task.args.copy()
new_module_args.update(