|
@@ -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
|