From 10f0d3ca9577d7951485387e8a7323fd690c6b43 Mon Sep 17 00:00:00 2001 From: jctanner Date: Mon, 21 Nov 2016 09:05:53 -0500 Subject: [PATCH] Set b_src to abspath of b_path so that symlinks work again. (#5678) Fixes #5653 --- lib/ansible/modules/files/file.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/files/file.py b/lib/ansible/modules/files/file.py index 9f1ab945dc..ff1baca2ce 100644 --- a/lib/ansible/modules/files/file.py +++ b/lib/ansible/modules/files/file.py @@ -238,6 +238,7 @@ def main(): if follow and state == 'link': # use the current target of the link as the source src = to_native(os.path.realpath(b_path), errors='strict') + b_src = to_bytes(os.path.realpath(b_path), errors='strict') else: module.fail_json(msg='src and dest are required for creating links')