mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 03:17:39 -02:30
feat: support insights service account credentials for project update
This commit is contained in:
@@ -1281,6 +1281,7 @@ class RunProjectUpdate(BaseTask):
|
|||||||
'local_path': os.path.basename(project_update.project.local_path),
|
'local_path': os.path.basename(project_update.project.local_path),
|
||||||
'project_path': project_update.get_project_path(check_if_exists=False), # deprecated
|
'project_path': project_update.get_project_path(check_if_exists=False), # deprecated
|
||||||
'insights_url': settings.INSIGHTS_URL_BASE,
|
'insights_url': settings.INSIGHTS_URL_BASE,
|
||||||
|
'oidc_endpoint': settings.INSIGHTS_OIDC_ENDPOINT,
|
||||||
'awx_license_type': get_license().get('license_type', 'UNLICENSED'),
|
'awx_license_type': get_license().get('license_type', 'UNLICENSED'),
|
||||||
'awx_version': get_awx_version(),
|
'awx_version': get_awx_version(),
|
||||||
'scm_url': scm_url,
|
'scm_url': scm_url,
|
||||||
@@ -1447,6 +1448,11 @@ class RunProjectUpdate(BaseTask):
|
|||||||
)
|
)
|
||||||
return params
|
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)
|
@task(queue=get_task_queuename)
|
||||||
class RunInventoryUpdate(SourceControlMixin, BaseTask):
|
class RunInventoryUpdate(SourceControlMixin, BaseTask):
|
||||||
|
|||||||
@@ -697,6 +697,7 @@ DISABLE_LOCAL_AUTH = False
|
|||||||
TOWER_URL_BASE = "https://platformhost"
|
TOWER_URL_BASE = "https://platformhost"
|
||||||
|
|
||||||
INSIGHTS_URL_BASE = "https://example.org"
|
INSIGHTS_URL_BASE = "https://example.org"
|
||||||
|
INSIGHTS_OIDC_ENDPOINT = "https://sso.example.org"
|
||||||
INSIGHTS_AGENT_MIME = 'application/example'
|
INSIGHTS_AGENT_MIME = 'application/example'
|
||||||
# See https://github.com/ansible/awx-facts-playbooks
|
# See https://github.com/ansible/awx-facts-playbooks
|
||||||
INSIGHTS_SYSTEM_ID_FILE = '/etc/redhat-access-insights/machine-id'
|
INSIGHTS_SYSTEM_ID_FILE = '/etc/redhat-access-insights/machine-id'
|
||||||
|
|||||||
Reference in New Issue
Block a user