ansible/ansible — pull request #9309 by iljabauer (2014-10-10 18:21:59+00:00)
Title: If included file is a symlink, set basedir in utils.path_dwim_relative() to the real path

If a role has following code in the main.yml:

- include: test.yml

and test.yml is a symlink and has following content:

- template: src=test.j2 dest=tmp

The file will not be found because the file will be searched in the folder of the main.yml.

With this change the file will be searched in the real folder of the file. Like this is done with directories in https://github.com/ansible/ansible/pull/4098