Skip to content

Commit

Permalink
Make use of the EE resolver code when launching jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbradberry authored and shanemcd committed Nov 23, 2020
1 parent 1befb35 commit 0259300
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 1 addition & 8 deletions awx/main/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,14 +881,7 @@ def get_path_to(self, *args):
return os.path.abspath(os.path.join(os.path.dirname(__file__), *args))

def build_execution_environment_params(self, instance):
if getattr(instance, 'execution_environment', None):
# TODO: process heirarchy, JT-project-org, maybe here
# or maybe in create_unified_job
logger.info('using custom image {}'.format(instance.execution_environment.image))
image = instance.execution_environment.image
else:
logger.info('using default image')
image = settings.AWX_EXECUTION_ENVIRONMENT_DEFAULT_IMAGE
image = instance.execution_environment.image
params = {
"container_image": image,
"process_isolation": True
Expand Down
3 changes: 3 additions & 0 deletions awx/settings/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ def IS_TESTING(argv=None):
}
}

# TODO: remove this setting in favor of a default execution environment
AWX_EXECUTION_ENVIRONMENT_DEFAULT_IMAGE = 'quay.io/ansible/ansible-runner:devel'

AWX_CONTAINER_GROUP_K8S_API_TIMEOUT = 10
AWX_CONTAINER_GROUP_POD_LAUNCH_RETRIES = 100
AWX_CONTAINER_GROUP_POD_LAUNCH_RETRY_DELAY = 5
AWX_CONTAINER_GROUP_DEFAULT_NAMESPACE = 'default'

# TODO: remove this setting in favor of a default execution environment
AWX_CONTAINER_GROUP_DEFAULT_IMAGE = AWX_EXECUTION_ENVIRONMENT_DEFAULT_IMAGE

# Internationalization
Expand Down

0 comments on commit 0259300

Please sign in to comment.