Skip to content

Commit

Permalink
Merge pull request #6773 from ryanpetrello/playbook-scan-symlinks
Browse files Browse the repository at this point in the history
follow symlinks while discovering valid playbooks

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
  • Loading branch information
softwarefactory-project-zuul[bot] authored Apr 22, 2020
2 parents 9cfecb5 + 3dd21d7 commit 28c3fa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion awx/main/models/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions awx/main/utils/ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 28c3fa5

Please sign in to comment.