File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 1010 failed_when :
1111 - result.rc != 0
1212
13- # This is added so that the task name will be rendered correctly
14- # If item.condition_type is used and it doesn't exist, then the
15- # literal template text would appear as the task name
16- # e.g. "Verify that the {{ item.kind }} {{ item.name }} CR is {{ item.condition_type }}"
17- # and it would appear in the XML output incorrectly as
18- # "verify_that_the_item_kind_item_name_cr_is_item_condition_type"
19- - name : Set the condition type
20- ansible.builtin.set_fact :
21- condition_type : " {{ item.condition_type if item.condition_type is defined else '' }}"
22-
23- - name : |
24- {{ 'TEST' if condition_type | length > 0 }} Verify that the {{ item.kind }} {{ item.name }} CR is {{ condition_type }}
25- {{ common_cr_ready_test_id if condition_type | length > 0 }}
13+ - name : Verify that a CR is ready {{ common_cr_ready_test_id }}
2614 ansible.builtin.command :
2715 cmd : |
28- oc get {{ item.kind }} {{ item.name }} -o jsonpath='{.status.conditions[?(@.type=="{{ condition_type }}")].status}{"\n"}'
16+ oc get {{ item.kind }} {{ item.name }} -o jsonpath='{.status.conditions[?(@.type=="{{ item. condition_type }}")].status}{"\n"}'
2917 register : result
3018 changed_when : false
3119 failed_when :
3220 - result.stdout != "True"
21+ when :
22+ - common_cr_ready_test_id is defined
23+ - item.condition_type is defined
You can’t perform that action at this time.
0 commit comments