summaryrefslogtreecommitdiff
path: root/tests/integration/targets/vyos_interfaces/tests/httpapi/merged.yaml
blob: b5a82ef1c70f10dcdfa8a8a8ef0158b923aac6d4 (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
---
- debug:
    msg: START vyos_interfaces merged integration tests on connection={{ ansible_connection }}

- include_tasks: _remove_config.yaml

- block:
    - name: Merge interface configuration
      register: result
      vyos.rest.vyos_interfaces: &id001
        config:
          - name: eth0
            description: Ansible test interface
            mtu: 1450
        state: merged

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

    - name: Merge interface configuration (IDEMPOTENT)
      register: result
      vyos.rest.vyos_interfaces: *id001

    - name: Assert idempotent
      assert:
        that:
          - result.changed == false
          - result.commands == []

  always:
    - include_tasks: _remove_config.yaml