diff options
author | Adrià Sala <asala@redhat.com> | 2025-01-16 17:53:52 +0100 |
---|---|---|
committer | Adrià Sala <adrisalafer@gmail.com> | 2025-01-17 16:30:07 +0100 |
commit | 492c7a1af6802cd471ebd6aecec5fd10dd029e57 (patch) | |
tree | 55763118888a2fc45b1492e14cc3d391ac175e0c | |
parent | feat: update insights action plugin to handle oauth (#15742) (diff) | |
download | awx-devel.tar.xz awx-devel.zip |
-rw-r--r-- | awx/main/tasks/jobs.py | 6 | ||||
-rw-r--r-- | awx/settings/defaults.py | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/awx/main/tasks/jobs.py b/awx/main/tasks/jobs.py index 36493c4e21..2a8af43ecd 100644 --- a/awx/main/tasks/jobs.py +++ b/awx/main/tasks/jobs.py @@ -1281,6 +1281,7 @@ class RunProjectUpdate(BaseTask): 'local_path': os.path.basename(project_update.project.local_path), 'project_path': project_update.get_project_path(check_if_exists=False), # deprecated 'insights_url': settings.INSIGHTS_URL_BASE, + 'oidc_endpoint': settings.INSIGHTS_OIDC_ENDPOINT, 'awx_license_type': get_license().get('license_type', 'UNLICENSED'), 'awx_version': get_awx_version(), 'scm_url': scm_url, @@ -1447,6 +1448,11 @@ class RunProjectUpdate(BaseTask): ) return params + def build_credentials_list(self, project_update): + if project_update.scm_type == 'insights' and project_update.credential: + return [project_update.credential] + return [] + @task(queue=get_task_queuename) class RunInventoryUpdate(SourceControlMixin, BaseTask): diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index fe4364e03c..1cb33950e5 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -697,6 +697,7 @@ DISABLE_LOCAL_AUTH = False TOWER_URL_BASE = "https://platformhost" INSIGHTS_URL_BASE = "https://example.org" +INSIGHTS_OIDC_ENDPOINT = "https://sso.example.org" INSIGHTS_AGENT_MIME = 'application/example' # See https://github.com/ansible/awx-facts-playbooks INSIGHTS_SYSTEM_ID_FILE = '/etc/redhat-access-insights/machine-id' |