From 077ca3e07dfde1b3cd20855daf4c6fd8d44793b5 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 14 Jun 2017 15:48:42 -0400 Subject: [PATCH] skip hidden files for {host,group}_vars fixes #25712 --- lib/ansible/plugins/vars/host_group_vars.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/plugins/vars/host_group_vars.py b/lib/ansible/plugins/vars/host_group_vars.py index 9612b2f4b9..6bebdb0f34 100644 --- a/lib/ansible/plugins/vars/host_group_vars.py +++ b/lib/ansible/plugins/vars/host_group_vars.py @@ -108,6 +108,8 @@ class VarsModule(BaseVarsPlugin): if os.path.isdir(full_path): # matched dir name, so use all files included recursively for spath in os.listdir(full_path): + if spath.startswith('.'): + continue full_spath = os.path.join(full_path, spath) if os.path.isdir(full_spath): found.extend(self._find_vars_files(full_spath, ''))