From 48ec69c4f55274d3e5ca42d2ae6d73eaad0afc31 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Thu, 26 Oct 2017 12:06:10 -0400 Subject: [PATCH] retry cleanup of build artifacts for bwrap race condition --- awx/playbooks/clean_isolated.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/awx/playbooks/clean_isolated.yml b/awx/playbooks/clean_isolated.yml index e40e780396..f904abe5a8 100644 --- a/awx/playbooks/clean_isolated.yml +++ b/awx/playbooks/clean_isolated.yml @@ -16,4 +16,14 @@ - name: remove build artifacts file: path="{{item}}" state=absent + register: result with_items: "{{cleanup_dirs}}" + until: result|succeeded + ignore_errors: yes + retries: 3 + delay: 5 + + - name: fail if build artifacts were not cleaned + fail: + msg: 'Unable to cleanup build artifacts' + when: not result|succeeded