From bb07c443a43435a4774abd3364eb82902785dad1 Mon Sep 17 00:00:00 2001
From: Bruce Pennypacker <bpennypacker@care.com>
Date: Thu, 25 Jul 2013 09:59:23 -0400
Subject: [PATCH] doc update

---
 files/stat | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/files/stat b/files/stat
index 0478e03036e..c1d58995c3b 100644
--- a/files/stat
+++ b/files/stat
@@ -40,10 +40,17 @@ author: Bruce Pennypacker
 EXAMPLES = '''
 # Obtain the stats of /etc/foo.conf, and check that the file still belongs
 # to 'root'. Fail otherwise.
-- stats: path=/etc/foo.conf
+- stat: path=/etc/foo.conf
   register: st
 - fail: msg="Whoops! file ownership has changed"
   when: st.stat.pw_name != 'root'
+
+# Determine if a path exists and is a directory.  Note we need to test
+# both that p.stat.isdir actually exists, and also that it's set to true.
+- stat: path=/path/to/something
+  register: p
+- debug: msg="Path exists and is a directory"
+  when: p.stat.isdir is defined and p.stat.isdir == true
 '''
 
 import os