Skip to content

Commit

Permalink
follow symlinks while discovering valid playbooks
Browse files Browse the repository at this point in the history
related: #6769

Co-authored-by: Francois Herbert <[email protected]>
  • Loading branch information
ryanpetrello and fherbert committed Apr 21, 2020
1 parent cce5f26 commit d58bb2d
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 d58bb2d

Please sign in to comment.