2017-11-21 13:24:48 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Make sure test bridge does not exist before tests
|
|
|
|
command: ovs-vsctl del-br br-test
|
2017-11-21 13:34:27 +01:00
|
|
|
ignore_errors: yes
|
2017-11-21 13:24:48 +01:00
|
|
|
|
|
|
|
- name: Create bridge
|
|
|
|
openvswitch_bridge:
|
|
|
|
bridge: br-test
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
2019-06-05 16:32:15 +02:00
|
|
|
- result is changed
|
2017-11-21 13:24:48 +01:00
|
|
|
|
|
|
|
- name: Create bridge again (idempotent)
|
|
|
|
openvswitch_bridge:
|
|
|
|
bridge: br-test
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
2019-06-05 16:32:15 +02:00
|
|
|
- result is not changed
|
2017-11-21 13:24:48 +01:00
|
|
|
|
2019-06-05 16:32:15 +02:00
|
|
|
- name: Add fake bridge
|
|
|
|
openvswitch_bridge:
|
|
|
|
bridge: fake-br-test
|
|
|
|
parent: br-test
|
|
|
|
vlan: 100
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- result is changed
|
|
|
|
|
|
|
|
- name: Change fake bridge vlan
|
|
|
|
openvswitch_bridge:
|
|
|
|
bridge: fake-br-test
|
|
|
|
parent: br-test
|
|
|
|
vlan: 300
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- result is changed
|
|
|
|
|
|
|
|
- name: Tear down test bridges
|
2017-11-21 13:24:48 +01:00
|
|
|
command: ovs-vsctl del-br br-test
|