mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Make insights integration tests pass again
This commit is contained in:
parent
69dcbe0865
commit
b716e2b099
@ -1893,6 +1893,19 @@ class RunJob(BaseTask):
|
||||
return False
|
||||
return getattr(settings, 'AWX_PROOT_ENABLED', False)
|
||||
|
||||
def build_execution_environment_params(self, instance):
|
||||
params = super(RunJob, self).build_execution_environment_params(instance)
|
||||
# If this has an insights agent and it is not already mounted then show it
|
||||
insights_dir = os.path.dirname(settings.INSIGHTS_SYSTEM_ID_FILE)
|
||||
if instance.use_fact_cache and os.path.exists(insights_dir):
|
||||
logger.info('not parent of others')
|
||||
params.setdefault('container_volume_mounts', [])
|
||||
params['container_volume_mounts'].extend([
|
||||
f"{insights_dir}:{insights_dir}:Z",
|
||||
])
|
||||
|
||||
return params
|
||||
|
||||
def pre_run_hook(self, job, private_data_dir):
|
||||
super(RunJob, self).pre_run_hook(job, private_data_dir)
|
||||
if job.inventory is None:
|
||||
|
||||
@ -785,6 +785,8 @@ TOWER_URL_BASE = "https://towerhost"
|
||||
|
||||
INSIGHTS_URL_BASE = "https://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'
|
||||
|
||||
TOWER_SETTINGS_MANIFEST = {}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user