From c20beeef376436965b8169a8919b6ea1090999aa Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Tue, 6 Feb 2018 16:39:57 -0500 Subject: [PATCH] Apply regex to dir name only (#35744) --- lib/ansible/cli/galaxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py index 4b58e8a361..2c72130d07 100644 --- a/lib/ansible/cli/galaxy.py +++ b/lib/ansible/cli/galaxy.py @@ -233,7 +233,7 @@ class GalaxyCLI(CLI): for root, dirs, files in os.walk(role_skeleton, topdown=True): rel_root = os.path.relpath(root, role_skeleton) in_templates_dir = rel_root.split(os.sep, 1)[0] == 'templates' - dirs[:] = [d for d in dirs if not any(r.match(os.path.join(rel_root, d)) for r in skeleton_ignore_re)] + dirs[:] = [d for d in dirs if not any(r.match(d) for r in skeleton_ignore_re)] for f in files: filename, ext = os.path.splitext(f)