mirror of
https://github.com/ansible/awx.git
synced 2026-04-05 01:59:25 -02:30
Dont zip/unzip private data dir for local jobs
This commit is contained in:
@@ -3088,6 +3088,9 @@ class AWXReceptorJob:
|
|||||||
# Spawned in a thread so Receptor can start reading before we finish writing, we
|
# Spawned in a thread so Receptor can start reading before we finish writing, we
|
||||||
# write our payload to the left side of our socketpair.
|
# write our payload to the left side of our socketpair.
|
||||||
def transmit(self, _socket):
|
def transmit(self, _socket):
|
||||||
|
if self.work_type == 'local':
|
||||||
|
self.runner_params['only_transmit_kwargs'] = True
|
||||||
|
|
||||||
ansible_runner.interface.run(streamer='transmit',
|
ansible_runner.interface.run(streamer='transmit',
|
||||||
_output=_socket.makefile('wb'),
|
_output=_socket.makefile('wb'),
|
||||||
**self.runner_params)
|
**self.runner_params)
|
||||||
@@ -3106,7 +3109,6 @@ class AWXReceptorJob:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def receptor_params(self):
|
def receptor_params(self):
|
||||||
receptor_params = {}
|
|
||||||
if self.task.instance.is_container_group_task:
|
if self.task.instance.is_container_group_task:
|
||||||
spec_yaml = yaml.dump(self.pod_definition, explicit_start=True)
|
spec_yaml = yaml.dump(self.pod_definition, explicit_start=True)
|
||||||
kubeconfig_yaml = yaml.dump(self.kube_config, explicit_start=True)
|
kubeconfig_yaml = yaml.dump(self.kube_config, explicit_start=True)
|
||||||
@@ -3115,6 +3117,11 @@ class AWXReceptorJob:
|
|||||||
"secret_kube_pod": spec_yaml,
|
"secret_kube_pod": spec_yaml,
|
||||||
"secret_kube_config": kubeconfig_yaml
|
"secret_kube_config": kubeconfig_yaml
|
||||||
}
|
}
|
||||||
|
else:
|
||||||
|
private_data_dir = self.runner_params['private_data_dir']
|
||||||
|
receptor_params = {
|
||||||
|
"params": f"--private-data-dir={private_data_dir}"
|
||||||
|
}
|
||||||
|
|
||||||
return receptor_params
|
return receptor_params
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
worktype: local
|
worktype: local
|
||||||
command: ansible-runner
|
command: ansible-runner
|
||||||
params: worker
|
params: worker
|
||||||
|
allowruntimeparams: true
|
||||||
|
|
||||||
- work-kubernetes:
|
- work-kubernetes:
|
||||||
worktype: ocp
|
worktype: ocp
|
||||||
|
|||||||
Reference in New Issue
Block a user