From 88d91452354ebe9a8aee45ebad9771d51a28bcd2 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 --- files/stat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/stat b/files/stat index 11cd8a0792b..f05317f873c 100644 --- a/files/stat +++ b/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