1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #5576 from xyrix/symlink-bug-fix

fixed bug causing symlinks to fail in the host_vars, group_vars etc dire...
This commit is contained in:
jctanner 2014-02-04 11:39:54 -08:00
commit a0f91f2aaa

View file

@ -73,7 +73,7 @@ def _load_vars_from_path(path, results):
# symbolic link # symbolic link
if stat.S_ISLNK(pathstat.st_mode): if stat.S_ISLNK(pathstat.st_mode):
try: try:
target = os.readlink(path) target = os.path.realpath(path)
except os.error, err2: except os.error, err2:
raise errors.AnsibleError("The symbolic link at %s " raise errors.AnsibleError("The symbolic link at %s "
"is not readable: %s. Please check its permissions." "is not readable: %s. Please check its permissions."