diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 7f5dede047..f660cf1813 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -3088,6 +3088,9 @@ class AWXReceptorJob: # Spawned in a thread so Receptor can start reading before we finish writing, we # write our payload to the left side of our socketpair. def transmit(self, _socket): + if self.work_type == 'local': + self.runner_params['only_transmit_kwargs'] = True + ansible_runner.interface.run(streamer='transmit', _output=_socket.makefile('wb'), **self.runner_params) @@ -3106,7 +3109,6 @@ class AWXReceptorJob: @property def receptor_params(self): - receptor_params = {} if self.task.instance.is_container_group_task: spec_yaml = yaml.dump(self.pod_definition, 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_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 diff --git a/tools/docker-compose/receptor.conf b/tools/docker-compose/receptor.conf index 4c498243e2..f86d50f523 100644 --- a/tools/docker-compose/receptor.conf +++ b/tools/docker-compose/receptor.conf @@ -11,6 +11,7 @@ worktype: local command: ansible-runner params: worker + allowruntimeparams: true - work-kubernetes: worktype: ocp