summaryrefslogtreecommitdiff
path: root/test/integration/targets/nxos_vtp_version/tests/common/sanity.yaml
blob: 79801ab1b6c4bd2b000724fa2c70c966b0d989d0 (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
---
- debug: msg="START connection={{ ansible_connection }} nxos_vtp_version sanity test"
- debug: msg="Using provider={{ connection.transport }}"
  when: ansible_connection == "local"

- block:
  - name: enable feature vtp
    nxos_feature:
      feature: vtp
      state: enabled
      provider: "{{ connection }}"

  - name: configure vtp version
    nxos_vtp_version: &configure
      version: 2
      provider: "{{ connection }}"
    register: result

  - assert: &true
      that:
        - "result.changed == true"
  
  - name: "Conf Idempotence"
    nxos_vtp_version: *configure
    register: result

  - assert: &false
      that:
        - "result.changed == false"

  always:
  - name: disable feature vtp
    nxos_feature:
      feature: vtp
      state: disabled
      provider: "{{ connection }}"

- debug: msg="END connection={{ ansible_connection }} nxos_vtp_version sanity test"