From 9a845a03f4aa1809b66e432e7529ac5a0900e9c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Jane=C5=BE?= Date: Thu, 2 Oct 2014 18:17:27 +0200 Subject: [PATCH] Simplified condition in a stat module example testing if path is a directory. --- lib/ansible/modules/files/stat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/files/stat.py b/lib/ansible/modules/files/stat.py index 1544a028802..75429424afb 100644 --- a/lib/ansible/modules/files/stat.py +++ b/lib/ansible/modules/files/stat.py @@ -51,12 +51,12 @@ EXAMPLES = ''' - 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 +# Determine if a path exists and is a directory. Note that 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 + when: p.stat.isdir is defined and p.stat.isdir # Don't do md5 checksum - stat: path=/path/to/myhugefile get_md5=no