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