summaryrefslogtreecommitdiffstats
path: root/roles/openshift_provisioners/tasks
diff options
context:
space:
mode:
authorVadim Rutkovsky <vrutkovs@redhat.com>2018-01-22 17:26:36 +0100
committerVadim Rutkovsky <vrutkovs@redhat.com>2018-01-22 18:07:52 +0100
commit966019481268cd0bf7b3f352cded283221c24e39 (patch)
treeb7cb18b30cbc5ebdad9c0bdf37126b3f1b0f93b9 /roles/openshift_provisioners/tasks
parenta77205f5b49cc06b18c2d881512f9ec25e347a75 (diff)
downloadopenshift-966019481268cd0bf7b3f352cded283221c24e39.tar.gz
openshift-966019481268cd0bf7b3f352cded283221c24e39.tar.bz2
openshift-966019481268cd0bf7b3f352cded283221c24e39.tar.xz
openshift-966019481268cd0bf7b3f352cded283221c24e39.zip
failed_when lists are implicitely ANDs, not ORs
See https://github.com/ansible/ansible/issues/18311#issuecomment-258048690
Diffstat (limited to 'roles/openshift_provisioners/tasks')
-rw-r--r--roles/openshift_provisioners/tasks/oc_apply.yaml12
1 files changed, 3 insertions, 9 deletions
diff --git a/roles/openshift_provisioners/tasks/oc_apply.yaml b/roles/openshift_provisioners/tasks/oc_apply.yaml
index 239e1f1cc..27c8a4b81 100644
--- a/roles/openshift_provisioners/tasks/oc_apply.yaml
+++ b/roles/openshift_provisioners/tasks/oc_apply.yaml
@@ -15,9 +15,7 @@
apply -f {{ file_name }}
-n {{ namespace }}
register: generation_apply
- failed_when:
- - "'error' in generation_apply.stderr"
- - "generation_apply.rc != 0"
+ failed_when: "'error' in generation_apply.stderr or generation_apply.rc != 0"
changed_when: no
- name: Determine change status of {{file_content.kind}} {{file_content.metadata.name}}
@@ -38,9 +36,7 @@
delete -f {{ file_name }}
-n {{ namespace }}
register: generation_delete
- failed_when:
- - "'error' in generation_delete.stderr"
- - "generation_delete.rc != 0"
+ failed_when: "'error' in generation_delete.stderr or generation_delete.rc != 0"
changed_when: generation_delete.rc == 0
when: generation_apply.rc != 0
@@ -50,8 +46,6 @@
apply -f {{ file_name }}
-n {{ namespace }}
register: generation_apply
- failed_when:
- - "'error' in generation_apply.stderr"
- - "generation_apply.rc != 0"
+ failed_when: "'error' in generation_apply.stderr or generation_apply.rc | int != 0"
changed_when: generation_apply.rc == 0
when: generation_apply.rc != 0