mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
Merge pull request #11860 from AlanCoding/hybrid_artifacts
Do not remove artifacts for local work
This commit is contained in:
@@ -326,7 +326,7 @@ class AWXReceptorJob:
|
|||||||
# Artifacts are an output, but sometimes they are an input as well
|
# 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
|
# 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')
|
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)
|
shutil.rmtree(artifact_dir)
|
||||||
|
|
||||||
resultsock, resultfile = receptor_ctl.get_work_results(self.unit_id, return_socket=True, return_sockfile=True)
|
resultsock, resultfile = receptor_ctl.get_work_results(self.unit_id, return_socket=True, return_sockfile=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user