From 612216e8a03ebb0412637fc708927c63f80f25e7 Mon Sep 17 00:00:00 2001 From: Hao Liu Date: Tue, 31 May 2022 18:59:18 -0400 Subject: [PATCH] skip process isolation check for transmit and process moving down the process isolation executable so that transmit and process no longer checks for its existance ansible-runner worker will still run the check since it will invoke ansible-runner run with process-isolation-executable and it will still be checked properly Co-Authored-By: Jeff Bradberry <685957+jbradberry@users.noreply.github.com> Signed-off-by: Hao Liu --- ansible_runner/interface.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ansible_runner/interface.py b/ansible_runner/interface.py index fab592e58..9aff48776 100644 --- a/ansible_runner/interface.py +++ b/ansible_runner/interface.py @@ -83,12 +83,6 @@ def init_runner(**kwargs): if logfile: output.set_logfile(logfile) - if kwargs.get("process_isolation", False): - pi_executable = kwargs.get("process_isolation_executable", "podman") - if not check_isolation_executable_installed(pi_executable): - print(f'Unable to find process isolation executable: {pi_executable}') - sys.exit(1) - event_callback_handler = kwargs.pop('event_handler', None) status_callback_handler = kwargs.pop('status_handler', None) artifacts_handler = kwargs.pop('artifacts_handler', None) @@ -118,6 +112,13 @@ def init_runner(**kwargs): **kwargs) return stream_processor + + if kwargs.get("process_isolation", False): + pi_executable = kwargs.get("process_isolation_executable", "podman") + if not check_isolation_executable_installed(pi_executable): + print(f'Unable to find process isolation executable: {pi_executable}') + sys.exit(1) + kwargs.pop('_input', None) kwargs.pop('_output', None) rc = RunnerConfig(**kwargs)