1---
2
3- name: test bad condition
4  register: result
5  ignore_errors: true
6  sonic_command:
7    commands:
8      - show system
9    wait_for:
10      - result[0] contains bad_value_string
11
12- assert:
13    that:
14      - result.failed == true
15      - result.msg is defined
16
17- name: test bad condition with less retries
18  register: result
19  ignore_errors: true
20  sonic_command:
21    commands:
22      - show system
23    retries: 5
24    wait_for:
25      - result[0] contains bad_value_string
26
27- assert:
28    that:
29      - result.failed == true
30      - result.msg is defined
31