summaryrefslogtreecommitdiff
path: root/test/integration/targets/nxos_command/tests/cli/notequal.yaml
blob: 52e3b2e61e05935fe548bddfd04a74ee502af61b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- debug: msg="START cli/notequal.yaml"

- name: test neq operator
  nxos_command:
    commands:
      - show version
      - show interface mgmt0 | json
    wait_for:
      - "result[1].TABLE_interface.ROW_interface.state neq down"
    provider: "{{ cli }}"
  register: result

- assert:
    that:
      - "result.changed == false"
      - "result.stdout is defined"

- name: test != operator
  nxos_command:
    commands:
      - show version
      - show interface mgmt0 | json
    wait_for:
      - "result[1].TABLE_interface.ROW_interface.state != down"
    provider: "{{ cli }}"
  register: result

- assert:
    that:
      - "result.changed == false"
      - "result.stdout is defined"

- debug: msg="END cli/notequal.yaml"