mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Enforce EE pull policy on Container Groups
This commit is contained in:
@@ -3074,6 +3074,11 @@ class AWXReceptorJob:
|
|||||||
pod_spec['spec']['containers'][0]['image'] = ee.image
|
pod_spec['spec']['containers'][0]['image'] = ee.image
|
||||||
pod_spec['spec']['containers'][0]['args'] = ['ansible-runner', 'worker', '--private-data-dir=/runner']
|
pod_spec['spec']['containers'][0]['args'] = ['ansible-runner', 'worker', '--private-data-dir=/runner']
|
||||||
|
|
||||||
|
# Enforce EE Pull Policy
|
||||||
|
pull_options = {"always": "Always", "missing": "IfNotPresent", "never": "Never"}
|
||||||
|
if self.task and self.task.instance.execution_environment:
|
||||||
|
pod_spec['spec']['containers'][0]['imagePullPolicy'] = pull_options[self.task.instance.execution_environment.pull]
|
||||||
|
|
||||||
if self.task:
|
if self.task:
|
||||||
pod_spec['metadata'] = deepmerge(
|
pod_spec['metadata'] = deepmerge(
|
||||||
pod_spec.get('metadata', {}),
|
pod_spec.get('metadata', {}),
|
||||||
|
|||||||
Reference in New Issue
Block a user