From c35d83df13ca01c244b8838a498a5b89a2bb2dcc Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Mon, 19 Jun 2017 15:53:49 -0400 Subject: [PATCH] fix a race condition in isolated stdout processing --- awx/playbooks/check_isolated.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/awx/playbooks/check_isolated.yml b/awx/playbooks/check_isolated.yml index 508e3ebdff..5d4753025f 100644 --- a/awx/playbooks/check_isolated.yml +++ b/awx/playbooks/check_isolated.yml @@ -8,6 +8,10 @@ tasks: + - shell: "tower-expect is-alive {{src}}" + register: is_alive + ignore_errors: true + - name: copy artifacts from the isolated host synchronize: src: "{{src}}/artifacts/" @@ -15,6 +19,6 @@ mode: pull recursive: yes - - shell: "tower-expect is-alive {{src}}" - register: is_alive - failed_when: "is_alive.rc == 0" + - fail: + msg: "isolated task is still running" + when: "is_alive.rc == 0"