From 29c60bdaffe8cb19eb8ac8fc7e2e12097dfeebdc Mon Sep 17 00:00:00 2001 From: Serge van Ginderachter Date: Tue, 11 Mar 2014 12:20:58 +0100 Subject: [PATCH] group_vars plugin: do not parse hidden files in subfolders, e.g. avoid .svn/ --- lib/ansible/inventory/vars_plugins/group_vars.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/inventory/vars_plugins/group_vars.py b/lib/ansible/inventory/vars_plugins/group_vars.py index 3421565a5f..6be1d1f6ed 100644 --- a/lib/ansible/inventory/vars_plugins/group_vars.py +++ b/lib/ansible/inventory/vars_plugins/group_vars.py @@ -123,7 +123,8 @@ def _load_vars_from_folder(folder_path, results): # filesystem lists them. names.sort() - paths = [os.path.join(folder_path, name) for name in names] + # do not parse hidden files or dirs, e.g. .svn/ + paths = [os.path.join(folder_path, name) for name in names if not name.startswith('.')] for path in paths: _found, results = _load_vars_from_path(path, results) return results