mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
Merge pull request #6773 from ryanpetrello/playbook-scan-symlinks
follow symlinks while discovering valid playbooks Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -199,7 +199,7 @@ class ProjectOptions(models.Model):
|
|||||||
results = []
|
results = []
|
||||||
project_path = self.get_project_path()
|
project_path = self.get_project_path()
|
||||||
if 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):
|
if skip_directory(dirpath):
|
||||||
continue
|
continue
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ def could_be_playbook(project_path, dir_path, filename):
|
|||||||
matched = True
|
matched = True
|
||||||
break
|
break
|
||||||
except IOError:
|
except IOError:
|
||||||
|
logger.exception(f'failed to open {playbook_path}')
|
||||||
return None
|
return None
|
||||||
if not matched:
|
if not matched:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user