diff options
author | Vadim Rutkovsky <vrutkovs@redhat.com> | 2018-01-17 12:43:10 +0100 |
---|---|---|
committer | Vadim Rutkovsky <vrutkovs@redhat.com> | 2018-01-17 12:43:10 +0100 |
commit | edc4a03f14bc2e501a38c4faef229d21fb26a162 (patch) | |
tree | 2d1cec72384a2f341436a262449f0d8d606bad30 /roles/openshift_persistent_volumes | |
parent | d5241bd08465db72d5a4c4c36d7c4a14f151d688 (diff) | |
download | openshift-edc4a03f14bc2e501a38c4faef229d21fb26a162.tar.gz openshift-edc4a03f14bc2e501a38c4faef229d21fb26a162.tar.bz2 openshift-edc4a03f14bc2e501a38c4faef229d21fb26a162.tar.xz openshift-edc4a03f14bc2e501a38c4faef229d21fb26a162.zip |
Check rc for commands with openshift_client_binary and failed_when
This might mask some failures and continue instead of a failure
Diffstat (limited to 'roles/openshift_persistent_volumes')
-rw-r--r-- | roles/openshift_persistent_volumes/tasks/pv.yml | 2 | ||||
-rw-r--r-- | roles/openshift_persistent_volumes/tasks/pvc.yml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/roles/openshift_persistent_volumes/tasks/pv.yml b/roles/openshift_persistent_volumes/tasks/pv.yml index ef9ab7f5f..865269b7a 100644 --- a/roles/openshift_persistent_volumes/tasks/pv.yml +++ b/roles/openshift_persistent_volumes/tasks/pv.yml @@ -13,5 +13,5 @@ --config={{ mktemp.stdout }}/admin.kubeconfig register: pv_create_output when: persistent_volumes | length > 0 - failed_when: ('already exists' not in pv_create_output.stderr) and ('created' not in pv_create_output.stdout) + failed_when: "('already exists' not in pv_create_output.stderr) and ('created' not in pv_create_output.stdout) and pv_create_output.rc != 0" changed_when: ('created' in pv_create_output.stdout) diff --git a/roles/openshift_persistent_volumes/tasks/pvc.yml b/roles/openshift_persistent_volumes/tasks/pvc.yml index 2c5519192..6c12d128c 100644 --- a/roles/openshift_persistent_volumes/tasks/pvc.yml +++ b/roles/openshift_persistent_volumes/tasks/pvc.yml @@ -13,5 +13,5 @@ --config={{ mktemp.stdout }}/admin.kubeconfig register: pvc_create_output when: persistent_volume_claims | length > 0 - failed_when: ('already exists' not in pvc_create_output.stderr) and ('created' not in pvc_create_output.stdout) + failed_when: "('already exists' not in pvc_create_output.stderr) and ('created' not in pvc_create_output.stdout) and pvc_create_output.rc != 0" changed_when: ('created' in pvc_create_output.stdout) |