From 59a045e4cb18df3463a22985e70cb0173bbac196 Mon Sep 17 00:00:00 2001 From: Bruce Pennypacker Date: Tue, 25 Jun 2013 14:14:18 -0400 Subject: [PATCH] Fixed stat of symlinked dirs --- library/files/stat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/files/stat b/library/files/stat index 11cd8a0792..f05317f873 100644 --- a/library/files/stat +++ b/library/files/stat @@ -91,6 +91,11 @@ def main(): 'isgid' : bool(mode & stat.S_ISGID), } + if S_ISDIR(mode) and os.path.islink(path): + d['isdir'] = False + d['islnk'] = True + + module.exit_json(changed=False, stat=d) # this is magic, see lib/ansible/module_common.py