mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 06:26:00 -03:30
Add option to follow symlinks when scanning for playbooks
This commit is contained in:
@@ -423,6 +423,16 @@ register(
|
|||||||
category_slug='jobs',
|
category_slug='jobs',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
register(
|
||||||
|
'AWX_SHOW_PLAYBOOK_LINKS',
|
||||||
|
field_class=fields.BooleanField,
|
||||||
|
default=False,
|
||||||
|
label=_('Follow symlinks'),
|
||||||
|
help_text=_('Follow symbolic links when scanning for playbooks'),
|
||||||
|
category=_('Jobs'),
|
||||||
|
category_slug='jobs',
|
||||||
|
)
|
||||||
|
|
||||||
register(
|
register(
|
||||||
'PRIMARY_GALAXY_URL',
|
'PRIMARY_GALAXY_URL',
|
||||||
field_class=fields.URLField,
|
field_class=fields.URLField,
|
||||||
|
|||||||
@@ -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=settings.AWX_SHOW_PLAYBOOK_LINKS)):
|
||||||
if skip_directory(dirpath):
|
if skip_directory(dirpath):
|
||||||
continue
|
continue
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
|
|||||||
@@ -563,6 +563,9 @@ AWX_ROLES_ENABLED = True
|
|||||||
# Note: This setting may be overridden by database settings.
|
# Note: This setting may be overridden by database settings.
|
||||||
AWX_COLLECTIONS_ENABLED = True
|
AWX_COLLECTIONS_ENABLED = True
|
||||||
|
|
||||||
|
# Follow symlinks when scanning for playbooks
|
||||||
|
AWX_SHOW_PLAYBOOK_LINKS = False
|
||||||
|
|
||||||
# Settings for primary galaxy server, should be set in the UI
|
# Settings for primary galaxy server, should be set in the UI
|
||||||
PRIMARY_GALAXY_URL = ''
|
PRIMARY_GALAXY_URL = ''
|
||||||
PRIMARY_GALAXY_USERNAME = ''
|
PRIMARY_GALAXY_USERNAME = ''
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ export default ['i18n', function(i18n) {
|
|||||||
AWX_COLLECTIONS_ENABLED: {
|
AWX_COLLECTIONS_ENABLED: {
|
||||||
type: 'toggleSwitch',
|
type: 'toggleSwitch',
|
||||||
},
|
},
|
||||||
|
AWX_SHOW_PLAYBOOK_LINKS: {
|
||||||
|
type: 'toggleSwitch',
|
||||||
|
},
|
||||||
PRIMARY_GALAXY_URL: {
|
PRIMARY_GALAXY_URL: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
reset: 'PRIMARY_GALAXY_URL',
|
reset: 'PRIMARY_GALAXY_URL',
|
||||||
|
|||||||
Reference in New Issue
Block a user