mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Deal with the possibility of get_default_pod_spec not finding an EE
This commit is contained in:
parent
19da9955ce
commit
8ede74a7f6
@ -17,6 +17,9 @@ def get_default_execution_environment():
|
||||
|
||||
|
||||
def get_default_pod_spec():
|
||||
ee = get_default_execution_environment()
|
||||
if ee is None:
|
||||
raise RuntimeError("Unable to find an execution environment.")
|
||||
|
||||
return {
|
||||
"apiVersion": "v1",
|
||||
@ -25,7 +28,7 @@ def get_default_pod_spec():
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"image": get_default_execution_environment().image,
|
||||
"image": ee.image,
|
||||
"name": 'worker',
|
||||
"args": ['ansible-runner', 'worker', '--private-data-dir=/runner'],
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user