diff options
author | Steve Milner <smilner@redhat.com> | 2017-05-04 11:30:22 -0400 |
---|---|---|
committer | Steve Milner <smilner@redhat.com> | 2017-05-04 11:51:32 -0400 |
commit | 644228de3fd18f47399290535cb3aca5e2bfa009 (patch) | |
tree | b5e2e1185c7e88d10e913f13fcc23eb1b79a5d2d | |
parent | 03f33dae7238e0ffaac4f85d89af25be57dc5ecd (diff) | |
download | openshift-644228de3fd18f47399290535cb3aca5e2bfa009.tar.gz openshift-644228de3fd18f47399290535cb3aca5e2bfa009.tar.bz2 openshift-644228de3fd18f47399290535cb3aca5e2bfa009.tar.xz openshift-644228de3fd18f47399290535cb3aca5e2bfa009.zip |
Ensure good return code for specific until loops
-rw-r--r-- | playbooks/common/openshift-node/restart.yml | 2 | ||||
-rw-r--r-- | roles/openshift_node_upgrade/tasks/main.yml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/playbooks/common/openshift-node/restart.yml b/playbooks/common/openshift-node/restart.yml index 441b100e9..01cf948e0 100644 --- a/playbooks/common/openshift-node/restart.yml +++ b/playbooks/common/openshift-node/restart.yml @@ -51,7 +51,7 @@ register: node_output delegate_to: "{{ groups.oo_first_master.0 }}" when: inventory_hostname in groups.oo_nodes_to_config - until: node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True + until: node_output.results.returncode == 0 and node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True # Give the node two minutes to come back online. retries: 24 delay: 5 diff --git a/roles/openshift_node_upgrade/tasks/main.yml b/roles/openshift_node_upgrade/tasks/main.yml index 94c97d0a5..92937dd1f 100644 --- a/roles/openshift_node_upgrade/tasks/main.yml +++ b/roles/openshift_node_upgrade/tasks/main.yml @@ -137,7 +137,7 @@ name: "{{ openshift.common.hostname | lower }}" register: node_output delegate_to: "{{ groups.oo_first_master.0 }}" - until: node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True + until: node_output.results.returncode == 0 and node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True # Give the node two minutes to come back online. retries: 24 delay: 5 |