2017-06-12 11:13:41 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- command: ovs-vsctl add-br br-test
|
|
|
|
|
2017-06-12 15:41:10 +00:00
|
|
|
- name: Create bridge
|
|
|
|
openvswitch_db:
|
2017-06-12 11:13:41 +00:00
|
|
|
table: Bridge
|
|
|
|
record: br-test
|
|
|
|
col: other_config
|
|
|
|
key: disable-in-band
|
|
|
|
value: true
|
2017-06-12 15:48:59 +00:00
|
|
|
register: result
|
2017-06-12 11:13:41 +00:00
|
|
|
|
2017-06-12 15:41:10 +00:00
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: Create bridge again (idempotent)
|
|
|
|
openvswitch_db:
|
|
|
|
table: Bridge
|
|
|
|
record: br-test
|
|
|
|
col: other_config
|
|
|
|
key: disable-in-band
|
|
|
|
value: true
|
2017-06-12 15:48:59 +00:00
|
|
|
register: result
|
2017-06-12 15:41:10 +00:00
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
- name: Change column value
|
|
|
|
openvswitch_db:
|
2017-06-12 11:13:41 +00:00
|
|
|
table: Bridge
|
|
|
|
record: br-test
|
|
|
|
col: other_config
|
|
|
|
key: disable-in-band
|
|
|
|
value: false
|
2017-06-12 15:48:59 +00:00
|
|
|
register: result
|
2017-06-12 11:13:41 +00:00
|
|
|
|
2017-06-12 15:41:10 +00:00
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: Change column value again (idempotent)
|
|
|
|
openvswitch_db:
|
|
|
|
table: Bridge
|
|
|
|
record: br-test
|
|
|
|
col: other_config
|
|
|
|
key: disable-in-band
|
|
|
|
value: false
|
2017-06-12 15:48:59 +00:00
|
|
|
register: result
|
2017-06-12 15:41:10 +00:00
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
- name: Remove bridge
|
|
|
|
openvswitch_db:
|
|
|
|
table: Bridge
|
|
|
|
record: br-test
|
|
|
|
col: other_config
|
|
|
|
key: disable-in-band
|
|
|
|
value: false
|
|
|
|
state: absent
|
2017-06-12 15:48:59 +00:00
|
|
|
register: result
|
2017-06-12 15:41:10 +00:00
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
|
|
|
|
- name: Remove bridge again (idempotent)
|
|
|
|
openvswitch_db:
|
2017-06-12 11:13:41 +00:00
|
|
|
table: Bridge
|
|
|
|
record: br-test
|
|
|
|
col: other_config
|
|
|
|
key: disable-in-band
|
|
|
|
value: false
|
|
|
|
state: absent
|
2017-06-12 15:48:59 +00:00
|
|
|
register: result
|
2017-06-12 15:41:10 +00:00
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|