zuul-jobs/test-playbooks/multinode/multi-node-bridge.yaml
James E. Blair 4a76106743 Add multi-node integration jobs
Change-Id: I4a81f292acf993c8ab25c7cc36fddf704c485c6c
2019-07-04 14:16:15 +02:00

55 lines
1.6 KiB
YAML

- name: Test the multi-node-bridge role
hosts:
- switch
- peers
roles:
- multi-node-bridge
post_tasks:
- become: yes
block:
- name: openvswitch should be installed
package:
name: "{{ ovs_package }}"
state: installed
register: ovs_installed
- name: openvswitch should be running
service:
name: "{{ ovs_service }}"
state: started
enabled: yes
register: ovs_running
- name: bridge should exist
openvswitch_bridge:
bridge: "{{ bridge_name }}"
register: ovs_bridge
- name: port should exist
command: ovs-vsctl show
changed_when: false
register: ovs_port
- name: switch should be reachable
command: ping -c 4 {{ bridge_address_prefix }}.{{ bridge_address_offset }}
changed_when: false
failed_when: false
register: ovs_ping_switch
- name: peer should be reachable
command: ping -c 4 {{ bridge_address_prefix }}.{{ bridge_address_offset + 1 }}
changed_when: false
failed_when: false
register: ovs_ping_peer
- name: assert test results
assert:
that:
- ovs_installed is not changed
- ovs_running is not changed
- ovs_bridge is not changed
- ovs_port.rc == 0
- "'Port \"br-infra_' in ovs_port.stdout"
- ovs_ping_switch.rc == 0
- ovs_ping_peer.rc == 0