From 3dd21d720eb5351e63f9f31c4e601a67965dac56 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Tue, 21 Apr 2020 10:49:05 -0400 Subject: [PATCH] follow symlinks while discovering valid playbooks related: https://github.com/ansible/awx/pull/6769 Co-authored-by: Francois Herbert --- awx/main/models/projects.py | 2 +- awx/main/utils/ansible.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/main/models/projects.py b/awx/main/models/projects.py index 0207fec97b87..38ca20ab069d 100644 --- a/awx/main/models/projects.py +++ b/awx/main/models/projects.py @@ -199,7 +199,7 @@ def playbooks(self): results = [] project_path = self.get_project_path() if project_path: - for dirpath, dirnames, filenames in os.walk(smart_str(project_path)): + for dirpath, dirnames, filenames in os.walk(smart_str(project_path), followlinks=True): if skip_directory(dirpath): continue for filename in filenames: diff --git a/awx/main/utils/ansible.py b/awx/main/utils/ansible.py index 18011504b965..eda6d6d21491 100644 --- a/awx/main/utils/ansible.py +++ b/awx/main/utils/ansible.py @@ -64,6 +64,7 @@ def could_be_playbook(project_path, dir_path, filename): matched = True break except IOError: + logger.exception(f'failed to open {playbook_path}') return None if not matched: return None