zuul-jobs/roles/multi-node-bridge/tasks/common.yaml
David Moreau-Simard 645a3935ee
Multi-node: Set up connectivity with default OVS bridge
This sets up a default 'br-infra' bridge between nodes in a multi-node
job. Two groups are expected in order for this to be set up:
- switch
- peers

The 'switch' group, with only one expected member, will be set up as
the switch node while the 'peers' group will be connected to the switch
node with virtual ports.

The default settings such as the bridge name, the IP range used, the MTU
and so on can be overridden at the job level by setting vars.

Change-Id: If5a3f512837e5b235bd2f6dbfdbb454435aa983e
2017-09-26 15:32:02 -04:00

40 lines
949 B
YAML

- name: Include OS-specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
# RHEL and CentOS requires repositories provided by RDO in order to install
# openvswitch, set them up.
- name: Set-up RDO repositories
become: yes
package:
name: "{{ rdo_repository }}"
state: installed
when:
- rdo_repository is defined
- ansible_os_family == "RedHat"
register: rdo_repos
- name: Install openvswitch
become: yes
package:
name: "{{ ovs_package }}"
state: installed
- name: Ensure openvswitch is started
become: yes
service:
name: "{{ ovs_service }}"
state: started
enabled: yes
# If we've installed RDO repositories for openvswitch earlier, remove them
- name: Ensure RDO repositories are removed
become: yes
package:
name: "rdo-release"
state: absent
when: rdo_repos | changed