Skip to content

Commit

Permalink
Fix resource_provider dynaconf hook (#2133)
Browse files Browse the repository at this point in the history
* Fix traceback that appeared in image builds
* Better checking if galaxy_ng is using the resource_provider
No-Issue
  • Loading branch information
bmclaughlin authored Apr 29, 2024
1 parent 3ed26c9 commit b7b07e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions galaxy_ng/app/dynaconf_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,11 @@ def configure_legacy_roles(settings: Dynaconf) -> Dict[str, Any]:
def configure_resource_provider(settings: Dynaconf) -> Dict[str, Any]:
# The following variable is either a URL or a key file path.
ANSIBLE_BASE_JWT_KEY = settings.get("ANSIBLE_BASE_JWT_KEY")
if ANSIBLE_BASE_JWT_KEY:
HUB_API_ROOT = settings.get("HUB_API_ROOT")
if HUB_API_ROOT and (ANSIBLE_BASE_JWT_KEY in HUB_API_ROOT):
data = {
"ANSIBLE_API_HOSTNAME": settings.get("ANSIBLE_API_HOSTNAME"),
"ANSIBLE_CONTENT_HOSTNAME": settings.get("ANSIBLE_CONTENT_HOSTNAME"),
"ANSIBLE_API_HOSTNAME": settings.get("ANSIBLE_API_HOSTNAME", ""),
"ANSIBLE_CONTENT_HOSTNAME": settings.get("ANSIBLE_CONTENT_HOSTNAME", ""),
}
gw_url = urlparse(ANSIBLE_BASE_JWT_KEY)
if gw_url.scheme and gw_url.hostname:
Expand Down

0 comments on commit b7b07e9

Please sign in to comment.