summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics
diff options
context:
space:
mode:
authorVadim Rutkovsky <vrutkovs@redhat.com>2018-01-17 12:43:10 +0100
committerVadim Rutkovsky <vrutkovs@redhat.com>2018-01-17 12:43:10 +0100
commitedc4a03f14bc2e501a38c4faef229d21fb26a162 (patch)
tree2d1cec72384a2f341436a262449f0d8d606bad30 /roles/openshift_metrics
parentd5241bd08465db72d5a4c4c36d7c4a14f151d688 (diff)
downloadopenshift-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_metrics')
-rw-r--r--roles/openshift_metrics/tasks/oc_apply.yaml8
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/openshift_metrics/tasks/oc_apply.yaml b/roles/openshift_metrics/tasks/oc_apply.yaml
index 8ccfb7192..057963c1a 100644
--- a/roles/openshift_metrics/tasks/oc_apply.yaml
+++ b/roles/openshift_metrics/tasks/oc_apply.yaml
@@ -16,7 +16,9 @@
apply -f {{ file_name }}
-n {{namespace}}
register: generation_apply
- failed_when: "'error' in generation_apply.stderr"
+ failed_when:
+ - "'error' in generation_apply.stderr"
+ - "generation_apply.rc != 0"
changed_when: no
- name: Determine change status of {{file_content.kind}} {{file_content.metadata.name}}
@@ -28,5 +30,7 @@
register: version_changed
vars:
init_version: "{{ (generation_init is defined) | ternary(generation_init.stdout, '0') }}"
- failed_when: "'error' in version_changed.stderr"
+ failed_when:
+ - "'error' in version_changed.stderr"
+ - "version_changed.rc != 0"
changed_when: version_changed.stdout | int > init_version | int