From 69db160e2fff407ca89340ed5728d8fda89b65b2 Mon Sep 17 00:00:00 2001 From: Chris Jacobs Date: Tue, 4 Jun 2013 18:16:09 -0700 Subject: [PATCH 1/2] Skip dotfile in hosts dirs --- lib/ansible/inventory/dir.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/inventory/dir.py b/lib/ansible/inventory/dir.py index ac1e2aa5bf2..50ac33d2b1b 100644 --- a/lib/ansible/inventory/dir.py +++ b/lib/ansible/inventory/dir.py @@ -48,6 +48,9 @@ class InventoryDirectory(object): # this file is generated on a failed playbook and should only be # used when run specifically continue + # Skip hidden files + if i.startswith('.'): + continue # These are things inside of an inventory basedir if i in ("host_vars", "group_vars", "vars_plugins"): continue From 588d4080df64e69cbb3bdba0e05b9195e3894ebd Mon Sep 17 00:00:00 2001 From: Chris Jacobs Date: Tue, 4 Jun 2013 21:06:49 -0700 Subject: [PATCH 2/2] don't want to ignore explicit cwd --- lib/ansible/inventory/dir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/inventory/dir.py b/lib/ansible/inventory/dir.py index 50ac33d2b1b..46997d9be89 100644 --- a/lib/ansible/inventory/dir.py +++ b/lib/ansible/inventory/dir.py @@ -49,7 +49,7 @@ class InventoryDirectory(object): # used when run specifically continue # Skip hidden files - if i.startswith('.'): + if i.startswith('.') and not i.startswith('./'): continue # These are things inside of an inventory basedir if i in ("host_vars", "group_vars", "vars_plugins"):