summaryrefslogtreecommitdiffstats
path: root/roles/openshift_persistent_volumes
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-01-17 13:56:42 -0800
committerGitHub <noreply@github.com>2018-01-17 13:56:42 -0800
commit7e83e65fc7a76df0530a56e3f6e3897cb95c316d (patch)
tree337096dab9658fc7413af71b7a3eb6bb98c2050a /roles/openshift_persistent_volumes
parentfba3c1c4f3ffc1f0341a20192d392f16bf7659f4 (diff)
parent1dc910c68f845022f8749708bf191907e11efc13 (diff)
downloadopenshift-7e83e65fc7a76df0530a56e3f6e3897cb95c316d.tar.gz
openshift-7e83e65fc7a76df0530a56e3f6e3897cb95c316d.tar.bz2
openshift-7e83e65fc7a76df0530a56e3f6e3897cb95c316d.tar.xz
openshift-7e83e65fc7a76df0530a56e3f6e3897cb95c316d.zip
Merge pull request #6751 from vrutkovs/apply-check-rc
Automatic merge from submit-queue. Check that rc != 0 for steps with 'failed_when' Some parts don't check the result rc at all, some check that 'error' is present there. Instead the safest way is to check for both Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1534538
Diffstat (limited to 'roles/openshift_persistent_volumes')
-rw-r--r--roles/openshift_persistent_volumes/tasks/pv.yml2
-rw-r--r--roles/openshift_persistent_volumes/tasks/pvc.yml2
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)