summaryrefslogtreecommitdiff
path: root/test/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml
blob: 3bd8a4172b053a0b4b558af201d79927198d0d14 (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
35
36
37
38
39
---
- debug: msg="START {{ connection.transport }}/nonidempotent.yaml"

- name: setup
  nxos_config:
    lines: hostname switch
    provider: "{{ connection }}"
    match: none

- name: configure top level command
  nxos_config:
    lines: hostname foo
    provider: "{{ connection }}"
    match: strict
  register: result

- assert:
    that:
      - "result.changed == true"
      - "'hostname foo' in result.updates"

- name: configure top level command idempotent check
  nxos_config:
    lines: hostname foo
    provider: "{{ connection }}"
    match: strict
  register: result

- assert:
    that:
      - "result.changed == true"

- name: teardown
  nxos_config:
    lines: hostname switch
    provider: "{{ connection }}"
    match: none

- debug: msg="END {{ connection.transport }}/nonidempotent.yaml"