From cd86310562b4b8ff7e079bc8c86971a3da5ab223 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 8 Mar 2022 09:07:09 -0500 Subject: [PATCH] Do not remove artifacts for local work --- awx/main/tasks/receptor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tasks/receptor.py b/awx/main/tasks/receptor.py index 5d58217b6f..b72d1547a7 100644 --- a/awx/main/tasks/receptor.py +++ b/awx/main/tasks/receptor.py @@ -326,7 +326,7 @@ class AWXReceptorJob: # Artifacts are an output, but sometimes they are an input as well # this is the case with fact cache, where clearing facts deletes a file, and this must be captured artifact_dir = os.path.join(self.runner_params['private_data_dir'], 'artifacts') - if os.path.exists(artifact_dir): + if self.work_type != 'local' and os.path.exists(artifact_dir): shutil.rmtree(artifact_dir) resultsock, resultfile = receptor_ctl.get_work_results(self.unit_id, return_socket=True, return_sockfile=True)