issue (#8998) is not fixed!

`

[cfg@cfg test]$ ansible-playbook --diff -v --check -c local -i ‘127.0.0.1,’ test.yml

PLAY [all] ********************************************************************

GATHERING FACTS ***************************************************************

ok: [127.0.0.1]

TASK: [template] **************************************************************

changed: [127.0.0.1] => {“changed”: true, “dest”: “/tmp/test/test”, “gid”: 500, “group”: “cfg”, “mode”: “0777”, “owner”: “cfg”, “secontext”: “unconfined_u:object_r:user_home_t:s0”, “size”: 7, “src”: “test.j2”, “state”: “link”, “uid”: 500}

PLAY RECAP ********************************************************************
127.0.0.1 : ok=2 changed=1 unreachable=0 failed=0

[cfg@cfg test]$ ls -l test
lrwxrwxrwx. 1 cfg cfg 7 Sep 16 00:34 test → test.j2

`

I have patched the release1.7.1 with “git diff 08c679b20a35cccf14e32edcd1ae8e1f878d6e86 0d77cb6d2a0ea32d0d6e8b561cef88f09b0d5b56”
The bug is not fixed. The result is above.

Hi Vadim, yes I can confirm the issue there still exists, so I’ll re-open #8998. The original issue only noted that the file was modified despite --check being specified, but I do see that the link target is modified incorrectly when the playbook is run without --check.

Thanks!

This issue should be resolved now.

For all, we’ve introduced a new param (follow) for file/copy to help address this issue. Using this new param, you can now have the file/copy modules operate on the target of an existing link, rather than the link itself. This parameter defaults to “false”, to maintain backwards compatibility with the way those modules worked previously.

Thanks!