From 8e0b89bdbf8329d8391a371b2d01ca043d08d044 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 20 Jul 2017 11:06:48 -0400 Subject: [PATCH] corrected precedence, added comments to each entry --- lib/ansible/parsing/dataloader.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ansible/parsing/dataloader.py b/lib/ansible/parsing/dataloader.py index 93ed129e7b..2ee53ea484 100644 --- a/lib/ansible/parsing/dataloader.py +++ b/lib/ansible/parsing/dataloader.py @@ -304,11 +304,15 @@ class DataLoader: search.append(unfrackpath(os.path.join(basedir, 'tasks', source), follow=False)) # try to create absolute path for loader basedir + templates/files/vars + filename - search.append(unfrackpath(os.path.join(basedir, source), follow=False)) search.append(unfrackpath(os.path.join(dirname, source), follow=False)) + + # try to create absolute path for loader basedir + search.append(unfrackpath(os.path.join(basedir, source), follow=False)) + + # try to create absolute path for dirname + filename search.append(self.path_dwim(os.path.join(dirname, source))) - # try to create absolute path for loader basedir + filename + # try to create absolute path for filename search.append(self.path_dwim(source)) for candidate in search: